From 4773ff148fcc3f553f2f04018c40fa6f5916a5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=9Apiewak?= Date: Mon, 5 Aug 2024 16:13:32 +0200 Subject: [PATCH] Update HuffmanDecoder.cs --- ArcFormats/DxLib/HuffmanDecoder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArcFormats/DxLib/HuffmanDecoder.cs b/ArcFormats/DxLib/HuffmanDecoder.cs index 418d28ef..02b63ba8 100644 --- a/ArcFormats/DxLib/HuffmanDecoder.cs +++ b/ArcFormats/DxLib/HuffmanDecoder.cs @@ -343,9 +343,10 @@ namespace GameRes.Formats.DxLib if (0 == m_bit_count) { m_bits = m_input[m_src]; - m_src += 1; + m_src++; m_bit_count = 8; } + //bits are read backwards. bits |= ((ulong)((m_bits >> (7 - m_readBits)) & 1)) <<(count-1-i); --m_bit_count; m_readBits++;