summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-04 19:44:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-04 19:44:09 +0000
commit8fed10cdafa32ef4e1990378c72a599fc726f7a0 (patch)
tree990065061c7237b0a097a0fd1b3caab3bdabcb50
parent32639b87b44a76d3d4075a51d86d52a309774c7f (diff)
downloadperl-8fed10cdafa32ef4e1990378c72a599fc726f7a0.tar.gz
Yet Another Copying-Without-Paying-Attention-To-SvUTF8(sv) Bug
uncovered by #7980. p4raw-id: //depot/perl@7982
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index 50db696c82..5d00c697ed 100644
--- a/op.c
+++ b/op.c
@@ -6778,6 +6778,8 @@ Perl_peep(pTHX_ register OP *o)
if ((!SvFAKE(sv = *svp) || !SvREADONLY(sv)) && !IS_PADCONST(sv)) {
key = SvPV(sv, keylen);
lexname = newSVpvn_share(key, keylen, 0);
+ if (SvUTF8(sv))
+ SvUTF8_on(lexname);
SvREFCNT_dec(sv);
*svp = lexname;
}