Fixed warning about potentially undefined behaviour.

svn-id: r31667
This commit is contained in:
Torbjörn Andersson 2008-04-23 17:39:13 +00:00
parent b69ffa922a
commit a643a8cc8a

View File

@ -288,7 +288,9 @@ void LzhDecompressor::make_table(uint nchar, byte bitlen[], uint tablebits, uint
start[i] >>= jutbits;
weight[i] = 1U << (tablebits - i);
}
while (i <= 16) weight[i++] = 1U << (16 - i);
for (; i <= 16; i++) {
weight[i] = 1U << (16 - i);
}
i = start[tablebits + 1] >> jutbits;
if (i != (uint16)(1U << 16)) {
k = 1U << tablebits;