From 43ea6eee9e29f22ef1e242a932f09d839504d244 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 24 Oct 2000 14:03:16 +0000 Subject: [PATCH] Fix the bug ID 20001024.005, the bug introduced by #7416. p4raw-id: //depot/perl@7422 --- pp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pp.c b/pp.c index 35f5956..03f35eb 100644 --- a/pp.c +++ b/pp.c @@ -3361,9 +3361,9 @@ PP(pp_unpack) register char *str; /* These must not be in registers: */ - I16 ashort; + short ashort; int aint; - STRLEN along; + long along; #ifdef HAS_QUAD Quad_t aquad; #endif @@ -3659,7 +3659,9 @@ PP(pp_unpack) len = strend - s; if (checksum) { while (len-- > 0 && s < strend) { - auint = utf8_to_uv_chk((U8*)s, strend - s, &along, 0); + STRLEN alen; + auint = utf8_to_uv_chk((U8*)s, strend - s, &alen, 0); + along = alen; s += along; if (checksum > 32) cdouble += (NV)auint; @@ -3671,7 +3673,9 @@ PP(pp_unpack) EXTEND(SP, len); EXTEND_MORTAL(len); while (len-- > 0 && s < strend) { - auint = utf8_to_uv_chk((U8*)s, strend - s, &along, 0); + STRLEN alen; + auint = utf8_to_uv_chk((U8*)s, strend - s, &alen, 0); + along = alen; s += along; sv = NEWSV(37, 0); sv_setuv(sv, (UV)auint); -- 2.7.4