]> granicus.if.org Git - php/commitdiff
now
authorThies C. Arntzen <thies@php.net>
Wed, 1 Mar 2000 13:59:51 +0000 (13:59 +0000)
committerThies C. Arntzen <thies@php.net>
Wed, 1 Mar 2000 13:59:51 +0000 (13:59 +0000)
Zend/zend_operators.c

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