cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit 563d861f921492dae64e810c6673c991f1d2d3e2
parent 6820448db52885a6828d805c1ce8ee7fcf6e4d65
Author: Max Bruckner <max@maxbruckner.de>
Date:   Thu, 20 Dec 2018 18:12:23 +0100

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!

Diffstat:
McJSON_Utils.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cJSON_Utils.c b/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. */