cJSON

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

commit 075a06f40bdc4f836c7dd7cad690d253a57cfc50
parent 3c18c8351314d36615def26406200f91dc03cb3d
Author: Max Bruckner <max@maxbruckner.de>
Date:   Tue, 11 Apr 2017 16:38:51 +0200

cJSONUtils_ApplyPatches: Fix not accepting arrays

This was completely broken, arrays weren't accepted.

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

diff --git a/cJSON_Utils.c b/cJSON_Utils.c @@ -504,12 +504,7 @@ CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON *object, cJSON *patches) { int err = 0; - if (patches == NULL) - { - return 1; - } - - if (cJSON_IsArray(patches)) + if (!cJSON_IsArray(patches)) { /* malformed patches. */ return 1;