From: cielavenir Date: Fri, 16 Aug 2019 16:59:38 +0000 (+0900) Subject: try to consume available data if Z_FINISH is used X-Git-Tag: 1.9.9-b1~452 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a3c5728de1a8fc21add5d7c36f3a48cb1010f16;p=thirdparty%2Fzlib-ng.git try to consume available data if Z_FINISH is used --- diff --git a/arch/x86/deflate_quick.c b/arch/x86/deflate_quick.c index 0c519692..199ec734 100644 --- a/arch/x86/deflate_quick.c +++ b/arch/x86/deflate_quick.c @@ -230,7 +230,9 @@ ZLIB_INTERNAL block_state deflate_quick(deflate_state *s, int flush) { do { if (s->pending + 4 >= s->pending_buf_size) { flush_pending(s->strm); - return need_more; + if (flush != Z_FINISH) { + return need_more; + } } if (s->lookahead < MIN_LOOKAHEAD) {