mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
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:
parent
6820448db5
commit
563d861f92
@ -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…
Reference in New Issue
Block a user