This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] Re: Copying PV only with possible UTF-8 characters
authorJohn Peacock <jpeacock@rowman.com>
Sun, 24 Feb 2002 22:08:28 +0000 (17:08 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 25 Feb 2002 03:02:23 +0000 (03:02 +0000)
Message-ID: <3C79AAAC.6060903@rowman.com>

p4raw-id: //depot/perl@14859

sv.c

diff --git a/sv.c b/sv.c
index 6fab2ee..27150d6 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3168,8 +3168,10 @@ Perl_sv_copypv(pTHX_ SV *dsv, register SV *ssv)
 
     if ( SvTHINKFIRST(ssv) && SvROK(ssv) && SvAMAGIC(ssv) ) {
        tmpsv = AMG_CALLun(ssv,string);
-       if (SvTYPE(tmpsv) != SVt_RV || (SvRV(tmpsv) != SvRV(ssv)))
+       if (SvTYPE(tmpsv) != SVt_RV || (SvRV(tmpsv) != SvRV(ssv))) {
            SvSetSV(dsv,tmpsv);
+           return;
+       }
     }
     {
        STRLEN len;