mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
fix error C2124 in visual studio
This commit is contained in:
parent
23e4fbc639
commit
5d55c6c2ee
6
cJSON.c
6
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 @@ CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item)
|
||||
{
|
||||
if (!cJSON_IsNumber(item))
|
||||
{
|
||||
return 0.0/0.0;
|
||||
return NAN;
|
||||
}
|
||||
|
||||
return item->valuedouble;
|
||||
|
Loading…
Reference in New Issue
Block a user