Fix a boundary case in BackwardReferencesHashChainDistanceOnly.

The optimization for (len != MIN_LENGTH) actually only holds for
(len > MIN_LENGTH) but (len < MIN_LENGTH) can now happen as len can
be changed in the loop before.

Change-Id: I3f9f91a540206c80385c5fba96c3d64ab9536752
This commit is contained in:
Vincent Rabaud 2016-06-16 19:22:28 +02:00
parent cfbcc5ece0
commit 0174d18d8b

View File

@ -1240,7 +1240,7 @@ static int BackwardReferencesHashChainDistanceOnly(
}
goto next_symbol;
}
if (len != MIN_LENGTH) {
if (len > MIN_LENGTH) {
int code_min_length;
double cost_total;
offset = HashChainFindOffset(hash_chain, i);