Update parson and fix json_object_set_value (#983)

* Remove parson folder

* add submodule parson

* FIX amxx_json_object_set_value generate a crash if invalid value is passed

* restore parson folder status
This commit is contained in:
Franco Romaniello authored and GitHub committed 2021-09-17 13:06:54 +02:00
1 parent e17d37abe3
commit 3289b3c63c
3 files changed
+880 -426

No files matched your search

+6
View File
@@ -697,6 +697,12 @@ static cell AMX_NATIVE_CALL amxx_json_object_set_value(AMX *amx, cell *params)
return 0;
}
if (!JsonMngr->IsValidHandle(params[3], Handle_Object))
{
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid JSON value! %d", params[3]);
return 0;
}
int len;
auto name = MF_GetAmxString(amx, params[2], 0, &len);