summaryrefslogtreecommitdiff
path: root/lib/zlib_deflate/defutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zlib_deflate/defutil.h')
-rw-r--r--lib/zlib_deflate/defutil.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/zlib_deflate/defutil.h b/lib/zlib_deflate/defutil.h
index 385333b22ec6..4ea40f5a279f 100644
--- a/lib/zlib_deflate/defutil.h
+++ b/lib/zlib_deflate/defutil.h
@@ -420,9 +420,11 @@ static inline void flush_pending(
z_streamp strm
)
{
+ unsigned len;
deflate_state *s = (deflate_state *) strm->state;
- unsigned len = s->pending;
+ bi_flush(s);
+ len = s->pending;
if (len > strm->avail_out) len = strm->avail_out;
if (len == 0) return;