summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index 2a58c28556..f5654cdde3 100644
--- a/op.c
+++ b/op.c
@@ -8337,7 +8337,7 @@ Perl_ck_method(pTHX_ OP *o)
if (!(strchr(method, ':') || strchr(method, '\''))) {
OP *cmop;
if (!SvREADONLY(sv) || !SvFAKE(sv)) {
- sv = newSVpvn_share(method, SvCUR(sv), 0);
+ sv = newSVpvn_share(method, SvUTF8(sv) ? -SvCUR(sv) : SvCUR(sv), 0);
}
else {
kSVOP->op_sv = NULL;