From: Eric Biggers Date: Wed, 5 Sep 2012 03:42:46 +0000 (-0500) Subject: LZ77 lazy match fix X-Git-Tag: v1.0.3~3 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=d64b441bfbf69eee70e3e228d03f50b98945126a;hp=1951d4115a203bc0febdce3d5e05562dab5828c6 LZ77 lazy match fix --- diff --git a/src/lz.c b/src/lz.c index 2f01850b..93d07f0d 100644 --- 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