diff --git a/cJSON.c b/cJSON.c index f619dbf013acfc88c6005edf5e62c31f5c201372_Y0pTT04uYw==..d26e0df32d3778769121cfaff2c74788d4d5c056_Y0pTT04uYw== 100644 --- a/cJSON.c +++ b/cJSON.c @@ -77,6 +77,10 @@ #define isnan(d) (d != d) #endif +#ifndef NAN +#define NAN 0.0/0.0 +#endif + typedef struct { const unsigned char *json; size_t position; @@ -102,7 +106,7 @@ { if (!cJSON_IsNumber(item)) { - return 0.0/0.0; + return NAN; } return item->valuedouble;