瀏覽代碼

correct mistake

Alanscut 5 年之前
父節點
當前提交
fa8b454552
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cJSON_Utils.c

+ 1 - 1
cJSON_Utils.c

@@ -1144,7 +1144,7 @@ static void create_patches(cJSON * const patches, const unsigned char * const pa
     switch (from->type & 0xFF)
     switch (from->type & 0xFF)
     {
     {
         case cJSON_Number:
         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);
                 compose_patch(patches, (const unsigned char*)"replace", path, NULL, to);
             }
             }