Merge pull request #484 from sappo/master

Problem: WError error on macosx because NAN is a float
This commit is contained in:
Alan Wang
2020-08-21 21:30:19 +08:00
committed by GitHub

View File

@ -106,7 +106,7 @@ CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item)
{ {
if (!cJSON_IsNumber(item)) if (!cJSON_IsNumber(item))
{ {
return NAN; return (double) NAN;
} }
return item->valuedouble; return item->valuedouble;