aboutsummaryrefslogtreecommitdiff
path: root/deflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2024-07-05 00:46:11 -0500
committerMark Adler <madler@alumni.caltech.edu>2024-07-05 00:48:56 -0500
commit884e0c0809e4cc5e88d6545d1c49de7946c1b1ca (patch)
tree9e768829934ca2d42af8822161a87713f8368af0 /deflate.c
parente011d8c164402cbb1baf92533dfb4f933ec08fee (diff)
downloadzlib-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/deflate.c b/deflate.c
index 0c9aa6d..1b0b3f7 100644
--- a/deflate.c
+++ b/deflate.c
@@ -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 &&