From dfc22f87bb90041d0e10d8ef2bf2ff80d171f851 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 21 Jun 2015 23:51:55 +0400 Subject: [PATCH] fixed ShiinaRio YLZ decompression. --- ArcFormats/ArcWARC.cs | 6 ++++-- ArcFormats/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ArcFormats/ArcWARC.cs b/ArcFormats/ArcWARC.cs index 936bc3be..a78aaaea 100644 --- a/ArcFormats/ArcWARC.cs +++ b/ArcFormats/ArcWARC.cs @@ -310,6 +310,7 @@ namespace GameRes.Formats.ShiinaRio bool GetCtlBit () { + bool bit = 0 != (m_ctl & m_mask); m_mask >>= 1; if (0 == m_mask) { @@ -317,7 +318,6 @@ namespace GameRes.Formats.ShiinaRio m_src += 4; m_mask = 0x80000000; } - bool bit = 0 != (m_ctl & m_mask); return bit; } @@ -335,6 +335,7 @@ namespace GameRes.Formats.ShiinaRio public void Unpack () { + GetCtlBit(); int dst = 0; while (dst < m_output.Length) { @@ -343,10 +344,11 @@ namespace GameRes.Formats.ShiinaRio m_output[dst++] = m_input[m_src++]; continue; } + bool next_bit = GetCtlBit(); int offset = m_input[m_src++] | ~0xffff; int ah = 0xff; int count = 0; - if (GetCtlBit()) // 5e + if (next_bit) // 5e { if (GetCtlBit()) // 10d { diff --git a/ArcFormats/Properties/AssemblyInfo.cs b/ArcFormats/Properties/AssemblyInfo.cs index d8fb68b2..f370b1dc 100644 --- a/ArcFormats/Properties/AssemblyInfo.cs +++ b/ArcFormats/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion ("1.0.7.66")] -[assembly: AssemblyFileVersion ("1.0.7.66")] +[assembly: AssemblyVersion ("1.0.7.67")] +[assembly: AssemblyFileVersion ("1.0.7.67")]