summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-24 14:03:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-24 14:03:16 +0000
commit43ea6eee9e29f22ef1e242a932f09d839504d244 (patch)
treeff7c814df4ef037c6955fcb9f6755d02bc6f6dde /pp.c
parent48f7ee7a00a9cc3c53df2208f08bd3848df9a5b5 (diff)
downloadperl-43ea6eee9e29f22ef1e242a932f09d839504d244.tar.gz
Fix the bug ID 20001024.005, the bug introduced by #7416.
p4raw-id: //depot/perl@7422
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index 35f5956829..03f35eb43c 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);