From 62ba68fc7df3da0e2cd8003b8584d901cdab381f Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 11 Apr 2017 16:38:51 +0200 Subject: [PATCH] cJSONUtils_ApplyPatches: Fix not accepting arrays This was completely broken, arrays weren't accepted. --- cJSON_Utils.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 92bb0b4..5d5422d 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -526,12 +526,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;