From: Mark Adler Date: Sat, 14 Jan 2012 18:53:23 +0000 (-0800) Subject: Make sure that no extra inserting is done if the strategy changes. X-Git-Tag: v1.2.5.3~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68f64498c2bbabaef0180f4d30207db2b0b67f07;p=thirdparty%2Fzlib-ng.git Make sure that no extra inserting is done if the strategy changes. --- diff --git a/deflate.c b/deflate.c index 0ba984d5e..98c4d6e19 100644 --- a/deflate.c +++ b/deflate.c @@ -1606,6 +1606,7 @@ local block_state deflate_stored(s, flush) FLUSH_BLOCK(s, 0); } } + s->insert = 0; if (flush == Z_FINISH) { FLUSH_BLOCK(s, 1); return finish_done; @@ -1914,6 +1915,7 @@ local block_state deflate_rle(s, flush) } if (bflush) FLUSH_BLOCK(s, 0); } + s->insert = 0; if (flush == Z_FINISH) { FLUSH_BLOCK(s, 1); return finish_done; @@ -1952,6 +1954,7 @@ local block_state deflate_huff(s, flush) s->strstart++; if (bflush) FLUSH_BLOCK(s, 0); } + s->insert = 0; if (flush == Z_FINISH) { FLUSH_BLOCK(s, 1); return finish_done;