From ee3c3bc80e23141f9dbc9425fb3fa0c071889fc1 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Thu, 27 Apr 2017 21:31:37 +0200 Subject: [PATCH] cJSONUtils_GeneratePatches: Fix multiple removes in arrays --- cJSON_Utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 5b8476c..c6308bf 100644 --- a/cJSON_Utils.c +++ b/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