This commit is contained in:
Thies C. Arntzen 2000-03-01 13:59:51 +00:00
parent 490569ca28
commit 4e5acab610

View file

@ -1362,8 +1362,8 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double
errno=0; errno=0;
local_dval = strtod(str, &end_ptr); local_dval = strtod(str, &end_ptr);
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */ if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
if (local_dval==HUGE_VAL || local_dval==-HUGE_VAL) { if (! finite(local_dval)) {
/* "inf" */ /* "inf","nan" and maybe other weird ones */
return 0; return 0;
} }