From fa8b4545522a7b9031246158f12164ed5698fbf5 Mon Sep 17 00:00:00 2001 From: Alanscut Date: Thu, 16 Jan 2020 17:10:52 +0800 Subject: [PATCH] correct mistake --- cJSON_Utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 1cbd80a..79e052b 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -1144,7 +1144,7 @@ static void create_patches(cJSON * const patches, const unsigned char * const pa switch (from->type & 0xFF) { case cJSON_Number: - if ((from->valueint != to->valueint) || (compare_double(from->valuedouble, to->valuedouble))) + if ((from->valueint != to->valueint) || !compare_double(from->valuedouble, to->valuedouble)) { compose_patch(patches, (const unsigned char*)"replace", path, NULL, to); }