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 8c900b9e07
commit 62ba68fc7d
1 changed files with 1 additions and 6 deletions

View File

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