فهرست منبع

cJSON_Utils: sort_lists: Properly split the lists

Since `prev` is not used anymore after that by the algorithm it should
have been fine anyways, still splitting it correctly in the first place
is probably a good idea.
Thanks @andysCaplin for the fix!
Max Bruckner 6 سال پیش
والد
کامیت
563d861f92
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      cJSON_Utils.c

+ 1 - 0
cJSON_Utils.c

@@ -499,6 +499,7 @@ static cJSON *sort_list(cJSON *list, const cJSON_bool case_sensitive)
     {
         /* Split the lists */
         second->prev->next = NULL;
+        second->prev = NULL;
     }
 
     /* Recursively sort the sub-lists. */