diff --git a/zlib/inflate.c b/zlib/inflate.c index 1afe007aa..1836d265f 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -229,7 +229,7 @@ int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) } if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; value &= (1L << bits) - 1; - state->hold += value << state->bits; + state->hold += (unsigned long)value << state->bits; state->bits += bits; return Z_OK; }