mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-26 23:24:00 +08:00
Update HuffmanDecoder.cs
Fix not so obvious errors.
This commit is contained in:
parent
57749e5cac
commit
ed0f0489d3
@ -143,7 +143,7 @@ namespace GameRes.Formats.DxLib
|
||||
ushort BitArrayFirstBatch;
|
||||
if (nodes[j].bitNumber > 9) continue;
|
||||
|
||||
BitArrayFirstBatch = (ushort)(nodes[j].bitArray[0] | (nodes[j].bitNumber << 8));
|
||||
BitArrayFirstBatch = (ushort)(nodes[j].bitArray[0] | (nodes[j].bitArray[1] << 8));
|
||||
|
||||
if ((i & bitMask[nodes[j].bitNumber - 1]) == (BitArrayFirstBatch & bitMask[nodes[j].bitNumber-1]))
|
||||
{
|
||||
@ -191,9 +191,11 @@ namespace GameRes.Formats.DxLib
|
||||
{
|
||||
PressBitData >>= nodes[NodeIndex].bitNumber;
|
||||
}
|
||||
while (NodeIndex>255)
|
||||
}
|
||||
|
||||
while (NodeIndex > 255)
|
||||
{
|
||||
if (PressBitCounter==8)
|
||||
if (PressBitCounter == 8)
|
||||
{
|
||||
PressSizeCounter++;
|
||||
PressBitData = compressedData[PressSizeCounter];
|
||||
@ -204,7 +206,6 @@ namespace GameRes.Formats.DxLib
|
||||
PressBitCounter++;
|
||||
NodeIndex = nodes[NodeIndex].ChildNode[Index];
|
||||
}
|
||||
}
|
||||
m_output[DestSizeCounter] = (byte)NodeIndex;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user