diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2012-01-14 10:53:23 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2012-01-14 10:53:23 -0800 |
commit | 68f64498c2bbabaef0180f4d30207db2b0b67f07 (patch) | |
tree | 0fee5f65e1e81faca9846b6be7a5685a3f79eac9 | |
parent | 4f5779a8e78e0b1c8b1ecdea88d8456dada17823 (diff) | |
download | zlib-68f64498c2bbabaef0180f4d30207db2b0b67f07.tar.gz |
Make sure that no extra inserting is done if the strategy changes.
-rw-r--r-- | deflate.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |