Addd loop guard to prevent negative bit shift

This commit is contained in:
Robert Osfield
2016-07-01 11:08:29 +01:00
parent ff50edfc57
commit 7c0c98b504

View File

@@ -2003,7 +2003,7 @@ uInt *v) // working area: values in order of bit length
// backup over finished tables
mask = (1 << w) - 1; // needed on HP, cc -O bug
while ((i & mask) != x[h])
while (((i & mask) != x[h]) && (w>=l))
{
h--; // don't need to update q
w -= l;