[win32] Trivial bugfix#3 from local repository
Gurusamy Sarathy [Sat, 6 Dec 1997 06:00:45 +0000 (01:00 -0500)]
Message-Id: <199712061100.GAA14864@aatma.engin.umich.edu>
Subject: Re: Assigning result of pop scrambles unrelated reference

p4raw-id: //depot/win32/perl@383

sv.c

diff --git a/sv.c b/sv.c
index 8e04c3c..d6c1039 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2091,6 +2091,7 @@ sv_setsv(SV *dstr, register SV *sstr)
         */
 
        if (SvTEMP(sstr) &&             /* slated for free anyway? */
+           SvREFCNT(sstr) == 1 &&      /* and no other references to it? */
            !(sflags & SVf_OOK))        /* and not involved in OOK hack? */
        {
            if (SvPVX(dstr)) {          /* we know that dtype >= SVt_PV */