Skip to content

fix: honor case_sensitive flag in generate_merge_patch (#1007)#1058

Open
JIgar-maheshwari-dev wants to merge 1 commit into
DaveGamble:developfrom
JIgar-maheshwari-dev:fix/merge-patch-case-sensitivity
Open

fix: honor case_sensitive flag in generate_merge_patch (#1007)#1058
JIgar-maheshwari-dev wants to merge 1 commit into
DaveGamble:developfrom
JIgar-maheshwari-dev:fix/merge-patch-case-sensitivity

Conversation

@JIgar-maheshwari-dev

Copy link
Copy Markdown

Fixes #1007

Overview

Fixes an inconsistency in cJSONUtils_GenerateMergePatch where key comparisons ignored the case_sensitive parameter after sorting.

Changes

  • Replaced strcmp at line 1391 in cJSON_Utils.c with compare_strings(..., case_sensitive) to properly match keys when case_sensitive == false.

Verification

  • Built and ran all utility unit tests (ENABLE_CJSON_UTILS=On and ENABLE_CJSON_TEST=On); all tests pass.

Replace strcmp with compare_strings in cJSONUtils_GenerateMergePatch
to ensure key comparisons respect the case_sensitive parameter.

Fixes DaveGamble#1007

Signed-off-by: JIgar-maheshwari-dev <maheshwarijigar656@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant