1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-23 15:12:04 +00:00

cJSONUtils_GeneratePatches: Fix multiple removes in arrays

This commit is contained in:
Max Bruckner 2017-04-27 21:31:37 +02:00
parent 18b4e2f941
commit ee3c3bc80e

View File

@ -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