summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-10-11 19:53:05 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-10-11 19:53:05 +0000
commitfb14229d046006b2f5d3159b99a4486315081739 (patch)
treebe1a7eaaac2ceeb3fe2780c520031fb5b4b68d77 /pp_ctl.c
parentcc23144fb7132c5baf97c1abe756f338a4d71959 (diff)
downloadperl-fb14229d046006b2f5d3159b99a4486315081739.tar.gz
Fix bug #17771 : segfault with the 'for' statement modifier
used inside a map or a grep. p4raw-id: //depot/perl@17998
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index b6393de5a1..0359935cf1 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -836,7 +836,7 @@ PP(pp_mapwhile)
}
/* copy the new items down to the destination list */
dst = PL_stack_base + (PL_markstack_ptr[-2] += items) - 1;
- while (items--)
+ while (items-- > 0)
*dst-- = SvTEMP(TOPs) ? POPs : sv_mortalcopy(POPs);
}
LEAVE; /* exit inner scope */