From 686f844969330b2b7463777cd412c44991de2302 Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 31 Dec 2018 15:27:50 +0400 Subject: [PATCH] (PSB): fixed version 3 interpreter. --- ArcFormats/Emote/ArcPSB.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ArcFormats/Emote/ArcPSB.cs b/ArcFormats/Emote/ArcPSB.cs index 5c54e8c1..590b3812 100644 --- a/ArcFormats/Emote/ArcPSB.cs +++ b/ArcFormats/Emote/ArcPSB.cs @@ -358,13 +358,17 @@ namespace GameRes.Formats.Emote if (encrypted && m_version < 3) m_flags = 2; - int header_size = m_version > 3 ? 0x30 : 0x24; + int header_size = m_version > 3 ? 0x30 : 0x20; var header = m_input.ReadBytes (header_size); if (encrypted && 0 != (m_flags & 1)) { - Decrypt (header, 0, 0x24); if (m_version > 3) + { + Decrypt (header, 0, 0x24); Decrypt (header, 0x24, 0xC); + } + else + Decrypt (header, 0, 0x20); } m_names = LittleEndian.ToInt32 (header, 0x04); // 0x08