From eaec82c3c557401a43e4b4ea5763b06830d7c362 Mon Sep 17 00:00:00 2001 From: yuta-oxo <13583684+yuta-oxo@users.noreply.github.com> Date: Wed, 12 Dec 2018 15:09:53 +0900 Subject: [PATCH] fix bug: sort_list() returns strange results --- cJSON_Utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 0d199f8..f0f9094 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -510,7 +510,7 @@ static cJSON *sort_list(cJSON *list, const cJSON_bool case_sensitive) while ((first != NULL) && (second != NULL)) { cJSON *smaller = NULL; - if (compare_strings((unsigned char*)first->string, (unsigned char*)second->string, false) < 0) + if (compare_strings((unsigned char*)first->string, (unsigned char*)second->string, case_sensitive) < 0) { smaller = first; }