1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-26 00:22:04 +00:00

cJSONUtils_ApplyPatches: Fix not accepting arrays

This was completely broken, arrays weren't accepted.
This commit is contained in:
Max Bruckner 2017-04-11 16:38:51 +02:00
parent 3c18c83513
commit 075a06f40b

View File

@ -504,12 +504,7 @@ CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON *object, cJSON *patches)
{
int err = 0;
if (patches == NULL)
{
return 1;
}
if (cJSON_IsArray(patches))
if (!cJSON_IsArray(patches))
{
/* malformed patches. */
return 1;