Skip to content

Commit

Permalink
Merge pull request #317 from yuta-oxo/fix_sort_list
Browse files Browse the repository at this point in the history
fix bug: sort_list() returns strange results
  • Loading branch information
FSMaxB authored Dec 16, 2018
2 parents be749d7 + eaec82c commit d606cbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cJSON_Utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d606cbb

Please sign in to comment.