Don't forget $c in C<(($a,$b,$c)=(1,2))=(3,4,5)>
Chip Salzenberg [Mon, 30 Dec 1996 21:34:20 +0000 (09:34 +1200)]
pp_hot.c

index 9633d54..f957deb 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -725,8 +725,9 @@ PP(pp_aassign)
            SP = lastrelem;
        else
            SP = firstrelem + (lastlelem - firstlelem);
+       lelem = firstlelem + (relem - firstrelem);
        while (relem <= SP)
-           *relem++ = &sv_undef;
+           *relem++ = (lelem <= lastlelem) ? *lelem++ : &sv_undef;
        RETURN;
     }
     else {
@@ -1905,7 +1906,7 @@ PP(pp_entersub)
            }
            cx->blk_sub.savearray = GvAV(defgv);
            cx->blk_sub.argarray = av;
-           GvAV(defgv) = cx->blk_sub.argarray;
+           GvAV(defgv) = (AV*)SvREFCNT_inc(av);
            ++MARK;
 
            if (items > AvMAX(av) + 1) {