fixed returning float parameters in read_data():s second parameter (by ref)

This commit is contained in:
Johnny Bergström 2004-11-13 08:56:11 +00:00
parent a86cb11fd7
commit 456d7b69a2

View File

@ -1454,9 +1454,9 @@ static cell AMX_NATIVE_CALL read_data(AMX *amx, cell *params) /* 3 param */
return set_amxstring(amx,params[2], g_events.getArgString( params[1] ),*get_amxaddr(amx,params[3])); return set_amxstring(amx,params[2], g_events.getArgString( params[1] ),*get_amxaddr(amx,params[3]));
default: default:
cell *fCell = get_amxaddr(amx, params[2]); cell *fCell = get_amxaddr(amx, params[2]);
REAL pFloat = amx_ctof(fCell); float fparam = g_events.getArgFloat(params[1]);
pFloat = g_events.getArgFloat( params[1] ); fCell[0] = amx_ftoc(fparam);
return (int)(pFloat); return (int)fparam;
} }
} }