This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #40557] regexec.c saves context stack position improperly
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index 8923104..6a996ce 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -831,6 +831,10 @@ Perl_leave_scope(pTHX_ I32 base)
            i = SSPOPINT;
            PL_stack_sp = PL_stack_base + i;
            break;
+       case SAVEt_STACK_CXPOS:         /* blk_oldsp on context stack */
+           i = SSPOPINT;
+           cxstack[i].blk_oldsp = SSPOPINT;
+           break;
        case SAVEt_AELEM:               /* array element */
            value = (SV*)SSPOPPTR;
            i = SSPOPINT;