Skip to content

Commit

Permalink
Correct used bits from deflateUsed() for deflate_stored() case.
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Jul 5, 2024
1 parent e011d8c commit 884e0c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1754,8 +1754,10 @@ local block_state deflate_stored(deflate_state *s, int flush) {
s->high_water = s->strstart;

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

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

0 comments on commit 884e0c0

Please sign in to comment.