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!
This commit is contained in:
Max Bruckner 2018-12-20 18:12:23 +01:00
parent 6820448db5
commit 563d861f92
1 changed files with 1 additions and 0 deletions

View File

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