소스 검색

cJSONUtils_GeneratePatches: Fix multiple removes in arrays

Max Bruckner 8 년 전
부모
커밋
ee3c3bc80e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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