Browse Source

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!
pull/340/head
Max Bruckner 6 years ago
parent
commit
563d861f92
  1. 1
      cJSON_Utils.c

1
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. */

Loading…
Cancel
Save