提交 b9cc9118 编写于 作者: M Max Bruckner

cJSON_Utils: Fix case sensitivity handling when adding to object

上级 9abe75e0
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册