From a4036ec1a2044ae2d677ec3df30cde04dd5a008a Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 30 Aug 2012 22:30:26 -0700 Subject: Stop calling get-magic twice when reading lvalue substr($utf8) --- mg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mg.c') diff --git a/mg.c b/mg.c index 09f9b60ea4..2de58e4616 100644 --- a/mg.c +++ b/mg.c @@ -2204,7 +2204,7 @@ Perl_magic_getsubstr(pTHX_ SV *sv, MAGIC *mg) PERL_UNUSED_ARG(mg); if (!translate_substr_offsets( - SvUTF8(lsv) ? sv_len_utf8(lsv) : len, + SvUTF8(lsv) ? sv_len_utf8_nomg(lsv) : len, negoff ? -(IV)offs : (IV)offs, !negoff, negrem ? -(IV)rem : (IV)rem, !negrem, &offs, &rem )) { -- cgit v1.2.1