Problem: WError error on macosx because NAN is a float

Solution: Add explicit cast from NAN to double
This commit is contained in:
Kevin Sapper 2020-06-23 09:16:26 +02:00
parent b95a4c56b0
commit 4578d3a9e1

View File

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