/* Return the low n bits of the bit accumulator (n < 16) */
#define BITS(n) \
- (hold & ((1U << (n)) - 1))
+ (hold & ((UINT64_C(1) << (n)) - 1))
/* Remove n bits from the bit accumulator */
#define DROPBITS(n) \
len = bits >> 3;
in -= len;
bits -= len << 3;
- hold &= (1U << bits) - 1;
+ hold &= (UINT64_C(1) << bits) - 1;
/* update state and return */
strm->next_in = in;
strm->avail_out =
(unsigned)(out < end ? (INFLATE_FAST_MIN_LEFT - 1) + (end - out)
: (INFLATE_FAST_MIN_LEFT - 1) - (out - end));
- state->hold = hold;
+
+ Assert(bits <= 32, "Remaining bits greater than 32");
+ state->hold = (uint32_t)hold;
state->bits = bits;
return;
}