summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-04-07 07:37:59 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-04-07 07:37:59 +0000
commite3c9a8b9e0e8ab67833a50cc3f37939286b04437 (patch)
tree3d5174957e9209e5f2e65cbc99cbd32f7badba2d /op.c
parent61e439284aa29a738760ac931108bca0443afe32 (diff)
downloadperl-e3c9a8b9e0e8ab67833a50cc3f37939286b04437.tar.gz
The optree builder was looping when constructing the ops
for a map/grep block containing a while(1). (Bug reported by Pixel.) p4raw-id: //depot/perl@22667
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index b38c892927..46cc07b029 100644
--- a/op.c
+++ b/op.c
@@ -5430,7 +5430,7 @@ Perl_ck_grep(pTHX_ OP *o)
OP* k;
o = ck_sort(o);
kid = cLISTOPo->op_first->op_sibling;
- for (k = cLISTOPo->op_first->op_sibling->op_next; k; k = k->op_next) {
+ for (k = cUNOPx(kid)->op_first; k; k = k->op_next) {
kid = k;
}
kid->op_next = (OP*)gwop;