WinCE more implemented functions
[p5sagit/p5-mst-13.2.git] / mg.c
diff --git a/mg.c b/mg.c
index 1990b96..dc1666a 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -1881,6 +1881,7 @@ Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg)
        }
        i--;
     }
+    SvREFCNT_dec(av); /* remove extra count added by sv_add_backref() */
     return 0;
 }
 
@@ -2374,7 +2375,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
 #endif
        /* PL_origalen is set in perl_parse(). */
        s = SvPV_force(sv,len);
-       if (len >= (I32)PL_origalen) {
+       if (len >= (STRLEN)PL_origalen) {
            /* Longer than original, will be truncated. */
            Copy(s, PL_origargv[0], PL_origalen, char);
            PL_origargv[0][PL_origalen - 1] = 0;