Update HuffmanDecoder.cs

Since Huffman node is now a class it must be explicitely initiated.
This commit is contained in:
Sławomir Śpiewak 2024-08-05 15:47:28 +02:00
parent 4d5be92386
commit 3f4c263ec5

View File

@ -89,6 +89,10 @@ namespace GameRes.Formats.DxLib
originalSize = compressedSize = headerSize = 0; originalSize = compressedSize = headerSize = 0;
ushort[] weights = new ushort[256]; ushort[] weights = new ushort[256];
nodes = new DXA8HuffmanNode[256+255]; //256 data nodes, then 255 hierarchy nodes. nodes = new DXA8HuffmanNode[256+255]; //256 data nodes, then 255 hierarchy nodes.
for (int i = 0; i < nodes.Length; i++)
{
nodes[i] = new DXA8HuffmanNode();
}
} }
public byte[] Unpack () public byte[] Unpack ()