summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-30 20:55:17 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-30 20:55:17 +0000
commit919acde01827c5ad450bac06c554f5a69eb06cef (patch)
tree0c9e2bb7ed854b7e5f86daf7b94e24ab6f86625d /pp.c
parent7d654f43b92f51303a8d5388d3c3bfb7ebbceb22 (diff)
downloadperl-919acde01827c5ad450bac06c554f5a69eb06cef.tar.gz
Localising hash slices with UTF-8 encoded keys was also buggy.
(See also change 27637) p4raw-id: //depot/perl@27638
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 99f0b06feb..467ef225d2 100644
--- a/pp.c
+++ b/pp.c
@@ -3887,7 +3887,8 @@ PP(pp_hslice)
else {
STRLEN keylen;
const char *key = SvPV_const(keysv, keylen);
- SAVEDELETE(hv, savepvn(key,keylen), keylen);
+ SAVEDELETE(hv, savepvn(key,keylen),
+ SvUTF8(keysv) ? -keylen : keylen);
}
}
}