Small improvement

This commit is contained in:
Emmanuel Marty 2022-04-04 13:58:00 +02:00 committed by GitHub
parent 34de880080
commit 81fd3af0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -229,12 +229,11 @@ static void lzsa_insert_forward_match_v2(lzsa_compressor *pCompressor, const uns
for (r = 0; fwd_match[r].length; r++) {
if (fwd_match[r].offset == nMatchOffset) {
r = -1;
break;
}
}
if (r != -1) {
if (fwd_match[r].length == 0) {
int nMaxRepLen = nEndOffset - nRepPos;
if (nMaxRepLen > LCP_MAX)
nMaxRepLen = LCP_MAX;