Skip to content

Commit

Permalink
cJSONUtils_ApplyPatches: Fix not accepting arrays
Browse files Browse the repository at this point in the history
This was completely broken, arrays weren't accepted.
  • Loading branch information
FSMaxB committed Apr 11, 2017
1 parent 3c18c83 commit 075a06f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cJSON_Utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 075a06f

Please sign in to comment.