Explorar o código

cJSONUtils_GeneratePatches: Fix multiple removes in arrays

Max Bruckner %!s(int64=8) %!d(string=hai) anos
pai
achega
ee3c3bc80e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cJSON_Utils.c

+ 1 - 1
cJSON_Utils.c

@@ -822,7 +822,7 @@ static void cJSONUtils_CompareToPatch(cJSON *patches, const unsigned char *path,
                 cJSONUtils_CompareToPatch(patches, newpath, from, to);
             }
             /* remove leftover elements from 'from' that are not in 'to' */
-            for (; from; (void)(from = from->next), c++)
+            for (; from; (void)(from = from->next))
             {
                 /* check if conversion to unsigned long is valid
                  * This should be eliminated at compile time by dead code elimination