Преглед изворни кода

cJSONUtils_ApplyPatches: Fix not accepting arrays

This was completely broken, arrays weren't accepted.
Max Bruckner пре 8 година
родитељ
комит
075a06f40b
1 измењених фајлова са 1 додато и 6 уклоњено
  1. 1 6
      cJSON_Utils.c

+ 1 - 6
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;