Fix regexec.c so $^N and $+ are correctly updated so that they work properly inside...
[p5sagit/p5-mst-13.2.git] / doop.c
diff --git a/doop.c b/doop.c
index dc525d3..59aa807 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -746,7 +746,7 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
     UV retnum = 0;
 
     if (offset < 0)
-       return retnum;
+       return 0;
     if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */
        Perl_croak(aTHX_ "Illegal number of bits in vec");
 
@@ -1217,13 +1217,13 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
        /* Avoid triggering overloading again by using temporaries.
           Maybe there should be a variant of sv_utf8_upgrade that takes pvn
        */
-       right = sv_2mortal(newSVpvn(rsave, rightlen));
+       right = newSVpvn_flags(rsave, rightlen, SVs_TEMP);
        sv_utf8_upgrade(right);
        rsave = rc = SvPV_nomg_const(right, rightlen);
        right_utf = TRUE;
     }
     else if (!left_utf && right_utf) {
-       left = sv_2mortal(newSVpvn(lsave, leftlen));
+       left = newSVpvn_flags(lsave, leftlen, SVs_TEMP);
        sv_utf8_upgrade(left);
        lsave = lc = SvPV_nomg_const(left, leftlen);
        left_utf = TRUE;