]> wimlib.net Git - wimlib/commitdiff
LZ77 lazy match fix
authorEric Biggers <ebiggers3@gmail.com>
Wed, 5 Sep 2012 03:42:46 +0000 (22:42 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 5 Sep 2012 03:42:46 +0000 (22:42 -0500)
src/lz.c

index 2f01850b987d96b9fd0ad2bc15b3e38ac83728c9..93d07f0d386ec2c311393f858aa4b4d37a076d1d 100644 (file)
--- a/src/lz.c
+++ b/src/lz.c
@@ -248,7 +248,7 @@ uint lz_analyze_block(const u8 uncompressed_data[], uint uncompressed_len,
                prev_start = match_start;
                match_len = params->min_match - 1;
 
-               if (hash_head != 0 && prev_len < params->min_match) {
+               if (hash_head != 0 && prev_len < params->max_lazy_match) {
                        /* To simplify the code, we prevent matches with the
                         * string of window index 0 (in particular we have to
                         * avoid a match of the string with itself at the start