From: Vincent Pit Date: Sun, 11 Jan 2009 14:01:27 +0000 (+0100) Subject: Reset the correct mark after unwinding X-Git-Tag: v0.04~10 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=9e84e2f54af8e1a651fa9dc0844ada16e249548a;p=perl%2Fmodules%2FScope-Upper.git Reset the correct mark after unwinding --- diff --git a/Upper.xs b/Upper.xs index 486c28b..53dd22f 100644 --- a/Upper.xs +++ b/Upper.xs @@ -527,7 +527,7 @@ STATIC void su_unwind(pTHX_ void *ud_) { OP fakeop; I32 cxix = ud->cxix; I32 items = ud->items - 1; - I32 gimme, mark = 0; + I32 gimme, mark; if (cxstack_ix > cxix) dounwind(cxix); @@ -535,10 +535,9 @@ STATIC void su_unwind(pTHX_ void *ud_) { /* Hide the level */ PL_stack_sp--; - gimme = GIMME_V; - if (cxix > 0) - mark = cxstack[cxix - 1].blk_oldsp; + mark = PL_markstack[cxstack[cxix].blk_oldmarksp]; + gimme = GIMME_V; if (gimme == G_SCALAR) { *PL_markstack_ptr = PL_stack_sp - PL_stack_base; PL_stack_sp += items;