Only Perform Dict Lookup if Attempts Remain
This commit is contained in:
parent
b6c35ed642
commit
b88a0b4e88
@ -288,7 +288,7 @@ LZ4HC_InsertAndGetWiderMatch (
|
||||
} } } }
|
||||
} /* while ((matchIndex>=lowLimit) && (matchIndex < (ip - base)) && (nbAttempts)) */
|
||||
|
||||
if (dictCtx != NULL) {
|
||||
if (dictCtx != NULL && nbAttempts) {
|
||||
ptrdiff_t dictIndexDelta = dictCtx->base - dictCtx->end + lowLimit;
|
||||
dictMatchIndex = dictCtx->hashTable[LZ4HC_hashPtr(ip)];
|
||||
matchIndex = dictMatchIndex + dictIndexDelta;
|
||||
|
Loading…
Reference in New Issue
Block a user