Make sure to consider small distances in LZ77.

This could corrupt certain images since commit
a3611513d2

Change-Id: Ifbe43abaafe8efb27c62af18039fea5a9dc4e062
This commit is contained in:
Vincent Rabaud 2016-06-16 10:34:26 +02:00 committed by Pascal Massimino
parent f2a0946a7a
commit cfbcc5ece0

View File

@ -464,7 +464,7 @@ static int BackwardReferencesLz77(int xsize, int ysize,
}
}
} else {
len = 1;
len = (len == 0) ? 1 : len;
}
// Go with literal or backward reference.
assert(len > 0);