From 5de3c4299aeef2737ce02b6b2e401a997da32cff Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Wed, 22 Mar 2023 20:15:54 +0100 Subject: 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 --- dist/Devel-PPPort/PPPort_pm.PL | 2 +- dist/Devel-PPPort/parts/inc/misc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'dist') diff --git a/dist/Devel-PPPort/PPPort_pm.PL b/dist/Devel-PPPort/PPPort_pm.PL index f1c1315970..33a54ab994 100644 --- a/dist/Devel-PPPort/PPPort_pm.PL +++ b/dist/Devel-PPPort/PPPort_pm.PL @@ -756,7 +756,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = '3.70'; +$VERSION = '3.71'; sub _init_data { 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); -- cgit v1.2.1