Explorar o código

Merge pull request #317 from yuta-oxo/fix_sort_list

fix bug: sort_list() returns strange results
Max Bruckner %!s(int64=6) %!d(string=hai) anos
pai
achega
d606cbbc64
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cJSON_Utils.c

+ 1 - 1
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;
         }