diff --git a/json_natives.cpp b/json_natives.cpp index 0713b07ea..5e93dd922 100644 --- a/json_natives.cpp +++ b/json_natives.cpp @@ -136,7 +136,7 @@ static cell_t GetObjectFloatValue(IPluginContext *pContext, const cell_t *params return pContext->ThrowNativeError("Could not retrieve value for key '%s'", key); } - return sp_ftoc(static_cast(json_real_value(value))); + return sp_ftoc(static_cast(json_number_value(value))); } static cell_t GetObjectIntValue(IPluginContext *pContext, const cell_t *params) @@ -537,7 +537,7 @@ static cell_t GetArrayFloatValue(IPluginContext *pContext, const cell_t *params) return pContext->ThrowNativeError("Could not retrieve value at index %d", index); } - return sp_ftoc(static_cast(json_real_value(value))); + return sp_ftoc(static_cast(json_number_value(value))); } static cell_t GetArrayIntValue(IPluginContext *pContext, const cell_t *params)