From 3f4c263ec5a3655d00386dcf288dfb86befd0d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=9Apiewak?= Date: Mon, 5 Aug 2024 15:47:28 +0200 Subject: [PATCH] Update HuffmanDecoder.cs Since Huffman node is now a class it must be explicitely initiated. --- ArcFormats/DxLib/HuffmanDecoder.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArcFormats/DxLib/HuffmanDecoder.cs b/ArcFormats/DxLib/HuffmanDecoder.cs index 42036769..008bc253 100644 --- a/ArcFormats/DxLib/HuffmanDecoder.cs +++ b/ArcFormats/DxLib/HuffmanDecoder.cs @@ -89,6 +89,10 @@ namespace GameRes.Formats.DxLib originalSize = compressedSize = headerSize = 0; ushort[] weights = new ushort[256]; 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 ()