A new try from Dave Mitchell for [perl #23265].
[p5sagit/p5-mst-13.2.git] / sv.c
diff --git a/sv.c b/sv.c
index 1b76e02..2c24d26 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5309,6 +5309,7 @@ Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv)
 #endif
     SvREFCNT(sv) = refcnt;
     SvFLAGS(nsv) |= SVTYPEMASK;                /* Mark as freed */
+    SvREFCNT(nsv) = 0;
     del_SV(nsv);
 }
 
@@ -6625,7 +6626,7 @@ thats_really_all_folks:
        /*The big, slow, and stupid way. */
 
       /* Any stack-challenged places. */
-#if defined(EPOC) || 1
+#if defined(EPOC)
       /* EPOC: need to work around SDK features.         *
        * On WINS: MS VC5 generates calls to _chkstk,     *
        * if a "large" stack frame is allocated.          *