]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - Upper.xs
su_uplevel: populate lower stack frames properly
[perl/modules/Scope-Upper.git] / Upper.xs
index 34edf0476779027249b7676e01f88ed62bcbde61..f7698d8a3dbb282826e02aa98f528bfe8b225ba0 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -1361,7 +1361,7 @@ static void su_unwind(pTHX_ void *ud_) {
   dounwind(cxix);
 
  mark = PL_markstack[cxstack[cxix].blk_oldmarksp];
*PL_markstack_ptr = PL_stack_sp - PL_stack_base - items;
PUSHMARK(PL_stack_sp - items);
 
  XSH_D({
   I32 gimme = GIMME_V;
@@ -1984,7 +1984,7 @@ static I32 su_uplevel(pTHX_ CV *callback, I32 cxix, I32 args) {
   * target context, plus the forthcoming arguments. */
  new_mark = cx->blk_oldsp;
  av_extend(si->si_stack, new_mark + 1 + args + 1);
- Copy(PL_curstack, AvARRAY(si->si_stack), new_mark + 1, SV *);
+ Copy(AvARRAY(PL_curstack), AvARRAY(si->si_stack), new_mark + 1, SV *);
  AvFILLp(si->si_stack) = new_mark;
  SU_POISON(AvARRAY(si->si_stack) + new_mark + 1, args + 1, SV *);