diff options
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 596888a..0608ec6 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -314,7 +314,7 @@ LZ4HC_InsertAndGetWiderMatch ( if (matchIndex + (U32)longest <= ipIndex) { U32 distanceToNextMatch = 1; int pos; - for (pos = 0; pos <= longest - MINMATCH; ++pos) { + for (pos = matchChainPos; pos <= longest - MINMATCH; ++pos) { U32 const candidateDist = DELTANEXTU16(chainTable, matchIndex + (U32)pos); if (candidateDist > distanceToNextMatch) { distanceToNextMatch = candidateDist; |