diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2024-07-05 00:46:11 -0500 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2024-07-05 00:48:56 -0500 |
commit | 884e0c0809e4cc5e88d6545d1c49de7946c1b1ca (patch) | |
tree | 9e768829934ca2d42af8822161a87713f8368af0 /deflate.c | |
parent | e011d8c164402cbb1baf92533dfb4f933ec08fee (diff) | |
download | zlib-884e0c0809e4cc5e88d6545d1c49de7946c1b1ca.tar.gz zlib-884e0c0809e4cc5e88d6545d1c49de7946c1b1ca.tar.bz2 zlib-884e0c0809e4cc5e88d6545d1c49de7946c1b1ca.zip |
Correct used bits from deflateUsed() for deflate_stored() case.
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1754,8 +1754,10 @@ local block_state deflate_stored(deflate_state *s, int flush) { | |||
1754 | s->high_water = s->strstart; | 1754 | s->high_water = s->strstart; |
1755 | 1755 | ||
1756 | /* If the last block was written to next_out, then done. */ | 1756 | /* If the last block was written to next_out, then done. */ |
1757 | if (last) | 1757 | if (last) { |
1758 | s->bi_used = 8; | ||
1758 | return finish_done; | 1759 | return finish_done; |
1760 | } | ||
1759 | 1761 | ||
1760 | /* If flushing and all input has been consumed, then done. */ | 1762 | /* If flushing and all input has been consumed, then done. */ |
1761 | if (flush != Z_NO_FLUSH && flush != Z_FINISH && | 1763 | if (flush != Z_NO_FLUSH && flush != Z_FINISH && |