]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove debug check for match beginning at start of window.
authorNathan Moinvaziri <nathan@solidstatenetworks.com>
Tue, 26 Jan 2021 00:47:37 +0000 (16:47 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 28 Jan 2021 08:52:05 +0000 (09:52 +0100)
deflate.c

index 4f781ab22a77fc47b4e8bcc4f0642a0e9ceb7422..1707f75c207889a5f16411311e5a33a2734e8c41 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -1201,10 +1201,8 @@ void check_match(deflate_state *s, Pos start, Pos match, int length) {
         fprintf(stderr, " start %u, match %u, length %d\n", start, match, length);
         z_error("invalid match length");
     }
-    /* check that the match isn't at the beginning of the window and that it isn't at
-     * the same position as the start string
-     */
-    if (match == 0 || match == start) {
+    /* check that the match isn't at the same position as the start string */
+    if (match == start) {
         fprintf(stderr, " start %u, match %u, length %d\n", start, match, length);
         z_error("invalid match position");
     }