From 006376b50f567e83b52c98a46c89eada65b428ca Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 23 Jun 2024 22:11:42 +0800 Subject: [PATCH] [server] Update `n_floatstr(...)` --- server/amx/amxfloat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/amx/amxfloat.c b/server/amx/amxfloat.c index 26eae2a..cc053e6 100644 --- a/server/amx/amxfloat.c +++ b/server/amx/amxfloat.c @@ -84,7 +84,11 @@ static cell AMX_NATIVE_CALL n_floatstr(AMX *amx,cell *params) amx_GetString(szSource, pString, 0, sizeof szSource); /* Now convert this to a float. */ +#ifdef WIN32 fNum = (REAL)atof(szSource); +#else + fNum = (REAL)strtod(szSource,NULL); +#endif return amx_ftoc(fNum); }