summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2004-03-05 16:13:53 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-03-05 14:13:50 +0000
commit3f63a7829490e7c2b14422ea9863ba16725d1ead (patch)
tree5a446891fcb679345338013dd595e78e5df7c262 /pp_ctl.c
parent4fe8ccd6f3a643c1e935d8a605fe1a817a041085 (diff)
downloadperl-3f63a7829490e7c2b14422ea9863ba16725d1ead.tar.gz
Re: Strange segfault
Message-ID: <20040305151353.5f3e913c@r2d2> p4raw-id: //depot/perl@22443
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index fa2c87ceae..fd98698121 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1056,6 +1056,7 @@ PP(pp_flip)
an exception for .."0" [#18165]). AMS 20021031. */
#define RANGE_IS_NUMERIC(left,right) ( \
+ (!SvOK(left) && !SvOK(right)) || \
SvNIOKp(left) || (SvOK(left) && !SvPOKp(left)) || \
SvNIOKp(right) || (SvOK(right) && !SvPOKp(right)) || \
(looks_like_number(left) && SvPOKp(left) && *SvPVX(left) != '0' && \
@@ -1797,8 +1798,11 @@ PP(pp_enteriter)
cx->blk_loop.iterix = SvIV(sv);
cx->blk_loop.itermax = SvIV((SV*)cx->blk_loop.iterary);
}
- else
+ else {
+ STRLEN n_a;
cx->blk_loop.iterlval = newSVsv(sv);
+ SvPV_force(cx->blk_loop.iterlval,n_a);
+ }
}
}
else {