We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dfe226 commit bf95ea0Copy full SHA for bf95ea0
pp_hot.c
@@ -5375,8 +5375,7 @@ PP(pp_subst)
5375
if (dstr) {
5376
/* replacement needing upgrading? */
5377
if (DO_UTF8(TARG) && !doutf8) {
5378
- nsv = sv_newmortal();
5379
- SvSetSV(nsv, dstr);
+ nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
5380
sv_utf8_upgrade(nsv);
5381
c = SvPV_const(nsv, clen);
5382
doutf8 = TRUE;
0 commit comments