diff options
author | Yves Orton <demerphq@gmail.com> | 2023-03-22 20:15:54 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-03-29 20:54:49 +0800 |
commit | 5de3c4299aeef2737ce02b6b2e401a997da32cff (patch) | |
tree | 1f4bfb12df135cd4ffa8eda16420e931fc524aa1 /dist/Devel-PPPort/parts/inc/misc | |
parent | 31d9da6590e36d49f32e1f9e4ec0681ee019de47 (diff) | |
download | perl-5de3c4299aeef2737ce02b6b2e401a997da32cff.tar.gz |
Devel-PPPort - deal with signed klen in check_HeUTF8
Some of the HV logic uses a negative key length to indicate utf8
keys, and this logic was using an unsigned keylength, which obviously
does not work
Diffstat (limited to 'dist/Devel-PPPort/parts/inc/misc')
-rw-r--r-- | dist/Devel-PPPort/parts/inc/misc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc index eb1e2b9eb8..86d7fdeed0 100644 --- a/dist/Devel-PPPort/parts/inc/misc +++ b/dist/Devel-PPPort/parts/inc/misc @@ -1434,8 +1434,8 @@ check_HeUTF8(utf8_key) hash = newHV(); key = SvPV(utf8_key, klen); - if (SvUTF8(utf8_key)) klen *= -1; - hv_store(hash, key, klen, newSVpvs("string"), 0); + hv_store(hash, key, SvUTF8(utf8_key) ? -klen : klen, + newSVpvs("string"), 0); hv_iterinit(hash); ent = hv_iternext(hash); assert(ent); |