mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-10-19 11:09:47 +00:00
fix bug: sort_list() returns strange results
This commit is contained in:
1 parent
cb1df2f88c
commit
eaec82c3c5
1 file changed
+1
-1
+1
-1
@@ -510,7 +510,7 @@ static cJSON *sort_list(cJSON *list, const cJSON_bool case_sensitive)
|
|||||||
while ((first != NULL) && (second != NULL))
|
while ((first != NULL) && (second != NULL))
|
||||||
{
|
{
|
||||||
cJSON *smaller = 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;
|
smaller = first;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user