summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-30 20:37:03 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-30 20:37:03 +0000
commit7d654f43b92f51303a8d5388d3c3bfb7ebbceb22 (patch)
tree2e25dddcf146578b2321b2bcd29bd231fc246916 /pp_hot.c
parent1baaf5d77b117bc72b4f2555e0c839aed879e744 (diff)
downloadperl-7d654f43b92f51303a8d5388d3c3bfb7ebbceb22.tar.gz
Fix bug #38815 (localising keys which are UTF-8 encoded didn't delete
them correctly on scope exit) p4raw-id: //depot/perl@27637
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 3b4d8ed076..91940ad81f 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1828,7 +1828,8 @@ PP(pp_helem)
if (!preeminent) {
STRLEN keylen;
const char * const key = SvPV_const(keysv, keylen);
- SAVEDELETE(hv, savepvn(key,keylen), keylen);
+ SAVEDELETE(hv, savepvn(key,keylen),
+ SvUTF8(keysv) ? -(I32)keylen : keylen);
} else
save_helem(hv, keysv, svp);
}