This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
slightly tweaked version of suggested patch
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index dd8742b..7849152 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5953,7 +5953,7 @@ Perl_scan_num(pTHX_ char *start)
     register char *d;                  /* destination in temp buffer */
     register char *e;                  /* end of temp buffer */
     I32 tryiv;                         /* used to see if it can be an int */
-    double value;                      /* number read, as a double */
+    NV value;                          /* number read, as a double */
     SV *sv;                            /* place to put the converted number */
     I32 floatit;                       /* boolean: int or float? */
     char *lastub = 0;                  /* position of last underbar */
@@ -6169,7 +6169,7 @@ Perl_scan_num(pTHX_ char *start)
           conversion at all.
        */
        tryiv = I_V(value);
-       if (!floatit && (double)tryiv == value)
+       if (!floatit && (NV)tryiv == value)
            sv_setiv(sv, tryiv);
        else
            sv_setnv(sv, value);