Skip to content

Commit 884e0c0

Browse files
committed
Correct used bits from deflateUsed() for deflate_stored() case.
1 parent e011d8c commit 884e0c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deflate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,8 +1754,10 @@ local block_state deflate_stored(deflate_state *s, int flush) {
17541754
s->high_water = s->strstart;
17551755

17561756
/* If the last block was written to next_out, then done. */
1757-
if (last)
1757+
if (last) {
1758+
s->bi_used = 8;
17581759
return finish_done;
1760+
}
17591761

17601762
/* If flushing and all input has been consumed, then done. */
17611763
if (flush != Z_NO_FLUSH && flush != Z_FINISH &&

0 commit comments

Comments
 (0)