summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2004-03-15 23:16:26 +0100
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2004-04-05 20:03:03 +0000
commite0ab1c0e1c533d7f19b4ffe230a3d921bf733a02 (patch)
tree1a9348874320960a458f9027f96d08293d67b49f /pp_ctl.c
parentdc9da78b70f004446f5a9327eea553687ad8c180 (diff)
downloadperl-e0ab1c0e1c533d7f19b4ffe230a3d921bf733a02.tar.gz
C<undef> doesn't look like a number. See also:
Subject: Re: [perl #27606] undef "looks like" a number Message-Id: <20040315221626.48061c67@r2d2> p4raw-id: //depot/perl@22662
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index f0ac9fcb95..ec21e69bb9 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1058,8 +1058,9 @@ PP(pp_flip)
#define RANGE_IS_NUMERIC(left,right) ( \
SvNIOKp(left) || (SvOK(left) && !SvPOKp(left)) || \
SvNIOKp(right) || (SvOK(right) && !SvPOKp(right)) || \
- (((!SvOK(left) && SvOK(right)) || (looks_like_number(left) && \
- SvPOKp(left) && *SvPVX(left) != '0')) && looks_like_number(right)))
+ (((!SvOK(left) && SvOK(right)) || ((!SvOK(left) || \
+ looks_like_number(left)) && SvPOKp(left) && *SvPVX(left) != '0')) \
+ && (!SvOK(right) || looks_like_number(right))))
PP(pp_flop)
{