From 7d0a77821c1a77f94305c3c54e06c1b8979caa92 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 5 Nov 1987 11:55:28 +0000 Subject: [PATCH] fixed bug in reading of longs in archive header --- modules/src/object/rd_arhdr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/src/object/rd_arhdr.c b/modules/src/object/rd_arhdr.c index 5d2a8dfc7..f9f868033 100644 --- a/modules/src/object/rd_arhdr.c +++ b/modules/src/object/rd_arhdr.c @@ -28,13 +28,13 @@ rd_arhdr(fd, arhdr) while (i--) { *p++ = *c++; } - arhdr->ar_date = get2(c) << 16; c += 2; - arhdr->ar_date |= get2(c) & 0xffff; c += 2; + arhdr->ar_date = ((long) get2(c)) << 16; c += 2; + arhdr->ar_date |= ((long) get2(c)) & 0xffff; c += 2; arhdr->ar_uid = *c++; arhdr->ar_gid = *c++; arhdr->ar_mode = get2(c); c += 2; - arhdr->ar_size = get2(c) << 16; c += 2; - arhdr->ar_size |= get2(c) & 0xffff; + arhdr->ar_size = (long) get2(c) << 16; c += 2; + arhdr->ar_size |= (long) get2(c) & 0xffff; } #if WORDS_REVERSED && !BYTES_REVERSED else {