mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-06-05 21:04:39 +00:00
cJSON_Utils: Fix case sensitivity handling when adding to object
This commit is contained in:
+8
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user