From 222686513e3201902b7ef0f73917ee7a18803d06 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Sun, 30 Apr 2017 19:36:51 +0200 Subject: [PATCH] apply_patch: configurable case sensitivity --- cJSON_Utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 7b4d8f3..50370ec 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -613,9 +613,8 @@ static void overwrite_item(cJSON * const root, const cJSON replacement) memcpy(root, &replacement, sizeof(cJSON)); } -static int apply_patch(cJSON *object, const cJSON *patch) +static int apply_patch(cJSON *object, const cJSON *patch, const cJSON_bool case_sensitive) { - cJSON_bool case_sensitive = false; cJSON *path = NULL; cJSON *value = NULL; cJSON *parent = NULL; @@ -848,7 +847,7 @@ CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON * const object, const cJSON * co while (current_patch != NULL) { - status = apply_patch(object, current_patch); + status = apply_patch(object, current_patch, false); if (status != 0) { return status;