summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index f1d4db5eec..b2c2ee0f64 100644
--- a/scope.c
+++ b/scope.c
@@ -931,6 +931,9 @@ Perl_leave_scope(pTHX_ I32 base)
(*SSPOPDXPTR)(aTHX_ ptr);
break;
case SAVEt_REGCONTEXT:
+ /* regexp must have croaked */
+ PL_savestack_ix -= uv >> SAVE_TIGHT_SHIFT;
+ break;
case SAVEt_ALLOC:
i = SSPOPINT;
PL_savestack_ix -= i; /* regexp must have croaked */