summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>1999-08-25 16:22:32 -0700
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-29 15:31:36 +0000
commite507f0504293808d931970586c0530e4bb738a80 (patch)
tree333414ef625a9d0ed5a6b2e4c55883747e210ee6 /op.c
parentae2d1787751a38d67ea377bb8eb603cbbf3a36bc (diff)
downloadperl-e507f0504293808d931970586c0530e4bb738a80.tar.gz
Lost arguments to simplified sort
To: perl5-porters@perl.org Message-ID: <14276.56616.879390.562685@metonymy.hip.berkeley.edu> p4raw-id: //depot/cfgperl@4048
Diffstat (limited to 'op.c')
-rw-r--r--op.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/op.c b/op.c
index 8ff0353491..a371d79c84 100644
--- a/op.c
+++ b/op.c
@@ -5553,9 +5553,10 @@ S_simplify_sort(pTHX_ OP *o)
o->op_private |= OPpSORT_NUMERIC;
if (k->op_type == OP_I_NCMP)
o->op_private |= OPpSORT_NUMERIC | OPpSORT_INTEGER;
- op_free(cLISTOPo->op_first->op_sibling); /* delete comparison block */
- cLISTOPo->op_first->op_sibling = cLISTOPo->op_last;
- cLISTOPo->op_children = 1;
+ kid = cLISTOPo->op_first->op_sibling;
+ cLISTOPo->op_first->op_sibling = kid->op_sibling; /* bypass old block */
+ op_free(kid); /* then delete it */
+ cLISTOPo->op_children--;
}
OP *