]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Make sure that no extra inserting is done if the strategy changes.
authorMark Adler <madler@alumni.caltech.edu>
Sat, 14 Jan 2012 18:53:23 +0000 (10:53 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Sat, 14 Jan 2012 18:53:23 +0000 (10:53 -0800)
deflate.c

index 0ba984d5ee2b2fa23bc6e31833cf610da36edfdc..98c4d6e19ca721b8d842e82d42ebcde176f390cb 100644 (file)
--- 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;