提交 4e333561 编写于 作者: A Alanscut

improve compare_double

上级 69bc9ccc
......@@ -109,7 +109,7 @@ static int compare_strings(const unsigned char *string1, const unsigned char *st
/* securely comparison of floating-point variables */
static cJSON_bool compare_double(double a, double b)
{
return (fabs(a - b) <= a * CJSON_DOUBLE_PRECISION);
return (fabs(a - b) <= CJSON_DOUBLE_PRECISION);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册