This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Detect infnan range ends.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 12 Jan 2015 03:58:35 +0000 (22:58 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 12 Jan 2015 11:45:13 +0000 (06:45 -0500)
pp_ctl.c

index fe5c25b..37b822c 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2095,6 +2095,8 @@ S_outside_integer(pTHX_ SV *sv)
 {
   if (SvOK(sv)) {
     const NV nv = SvNV_nomg(sv);
+    if (Perl_isinfnan(nv))
+      return TRUE;
 #ifdef NV_PRESERVES_UV
     if (nv < (NV)IV_MIN || nv > (NV)IV_MAX)
       return TRUE;