summaryrefslogtreecommitdiff
path: root/deflate.c
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-05-06 16:55:05 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-05-24 14:06:57 +0200
commit600dcc301259f006af5e7141ae9b7129d24f23ef (patch)
tree316a1224edf9e8be7e5296c443215d1c67e74948 /deflate.c
parent71fd2dcc40ed12bca3787b30a1ff867b6d2fe4ee (diff)
Use 64-bit bit buffer when emitting codes.
Diffstat (limited to 'deflate.c')
-rw-r--r--deflate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deflate.c b/deflate.c
index f696849..939f47e 100644
--- a/deflate.c
+++ b/deflate.c
@@ -596,7 +596,7 @@ int ZEXPORT PREFIX(deflatePrime)(PREFIX3(stream) *strm, int bits, int value) {
put = BIT_BUF_SIZE - s->bi_valid;
if (put > bits)
put = bits;
- s->bi_buf |= (uint32_t)((value & ((1 << put) - 1)) << s->bi_valid);
+ s->bi_buf |= (uint64_t)((value & ((1 << put) - 1)) << s->bi_valid);
s->bi_valid += put;
zng_tr_flush_bits(s);
value >>= put;