mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Modify isnan() operation
This commit is contained in:
parent
aad64e715d
commit
80cf5e3d79
@ -355,9 +355,9 @@ NCZ_stringconvert(nc_type typeid, size_t len, void* data0, NCjson** jdatap)
|
||||
#else
|
||||
if(isnan(d))
|
||||
special = "NaN";
|
||||
else if(isinf(d) < 0)
|
||||
else if(isinf(d) && d < 0)
|
||||
special = "-Infinity";
|
||||
else if(isinf(d) > 0)
|
||||
else if(isinf(d) && d > 0)
|
||||
special = "Infinity";
|
||||
else {}
|
||||
#endif
|
||||
@ -368,7 +368,7 @@ NCZ_stringconvert(nc_type typeid, size_t len, void* data0, NCjson** jdatap)
|
||||
break;
|
||||
default: stat = NC_EINTERNAL; goto done;
|
||||
}
|
||||
if(special) {nullfree(str); str = strdup(special);}
|
||||
if(special) {nullfree(str); str = strdup(special);}
|
||||
jvalue->value = str;
|
||||
str = NULL;
|
||||
nclistpush(jdata->contents,jvalue);
|
||||
|
Loading…
Reference in New Issue
Block a user