Merge pull request #417 from zjuchenyuan/patch-1

Update cJSON_Utils.c to avoid ‘CJSON_DOUBLE_PRECIION’ undeclared
This commit is contained in:
Alanscut 2019-12-09 08:54:55 +08:00 committed by GitHub
commit 69bc9ccc20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ static int compare_strings(const unsigned char *string1, const unsigned char *st
/* securely comparison of floating-point variables */ /* securely comparison of floating-point variables */
static cJSON_bool compare_double(double a, double b) static cJSON_bool compare_double(double a, double b)
{ {
return (fabs(a - b) <= a * CJSON_DOUBLE_PRECIION); return (fabs(a - b) <= a * CJSON_DOUBLE_PRECISION);
} }