summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 201c32e90b..a2dc38ee77 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1298,6 +1298,8 @@ PP(pp_return)
if (stack == sortstack) {
if (cxstack_ix == sortcxix || dopoptosub(cxstack_ix) < sortcxix) {
+ if (cxstack_ix > sortcxix)
+ dounwind(sortcxix);
AvARRAY(stack)[1] = *SP;
stack_sp = stack_base + 1;
return 0;