diff --git a/inflate.c b/inflate.c index 82e39be..2889e3a 100644 --- a/inflate.c +++ b/inflate.c @@ -645,6 +645,8 @@ int flush; NEEDBITS(16); #ifdef GUNZIP if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + if (state->wbits == 0) + state->wbits = 15; state->check = crc32(0L, Z_NULL, 0); CRC2(state->check, hold); INITBITS();