summaryrefslogtreecommitdiff
path: root/sys/lib/libz/trees.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/lib/libz/trees.c')
-rw-r--r--sys/lib/libz/trees.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/lib/libz/trees.c b/sys/lib/libz/trees.c
index cba0708b602..7ce629afb58 100644
--- a/sys/lib/libz/trees.c
+++ b/sys/lib/libz/trees.c
@@ -182,6 +182,7 @@ local void bi_windup(deflate_state *s) {
} else if (s->bi_valid > 0) {
put_byte(s, (Byte)s->bi_buf);
}
+ s->bi_used = ((s->bi_valid - 1) & 7) + 1;
s->bi_buf = 0;
s->bi_valid = 0;
#ifdef ZLIB_DEBUG
@@ -464,6 +465,7 @@ void ZLIB_INTERNAL _tr_init(deflate_state *s) {
s->bi_buf = 0;
s->bi_valid = 0;
+ s->bi_used = 0;
#ifdef ZLIB_DEBUG
s->compressed_len = 0L;
s->bits_sent = 0L;