From 075a06f40bdc4f836c7dd7cad690d253a57cfc50 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 b39e432..e72f140 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -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;