Skip to content

Commit

Permalink
cJSON_Utils: Fix case sensitivity handling when adding to object
Browse files Browse the repository at this point in the history
  • Loading branch information
FSMaxB committed Jun 14, 2017
1 parent 9abe75e commit b9cc911
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cJSON_Utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,14 @@ static int apply_patch(cJSON *object, const cJSON *patch, const cJSON_bool case_
}
else if (cJSON_IsObject(parent))
{
cJSON_DeleteItemFromObject(parent, (char*)child_pointer);
if (case_sensitive)
{
cJSON_DeleteItemFromObjectCaseSensitive(parent, (char*)child_pointer);
}
else
{
cJSON_DeleteItemFromObject(parent, (char*)child_pointer);
}
cJSON_AddItemToObject(parent, (char*)child_pointer, value);
value = NULL;
}
Expand Down

0 comments on commit b9cc911

Please sign in to comment.