From 0a73f4f96e5ba45273f238c2fb6572d01a0ed34a Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 1 May 2016 21:54:51 +0400 Subject: [PATCH] (AfaOpener): check archive version. --- ArcFormats/AliceSoft/ArcAFA.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArcFormats/AliceSoft/ArcAFA.cs b/ArcFormats/AliceSoft/ArcAFA.cs index 09e4b44c..ba40d37f 100644 --- a/ArcFormats/AliceSoft/ArcAFA.cs +++ b/ArcFormats/AliceSoft/ArcAFA.cs @@ -46,6 +46,7 @@ namespace GameRes.Formats.AliceSoft return null; if (!file.View.AsciiEqual (0x1C, "INFO")) return null; + int version = file.View.ReadInt32 (0x10); long base_offset = file.View.ReadUInt32 (0x18); uint packed_size = file.View.ReadUInt32 (0x20); int unpacked_size = file.View.ReadInt32 (0x24); @@ -73,7 +74,8 @@ namespace GameRes.Formats.AliceSoft var entry = FormatCatalog.Instance.Create (name); index.ReadInt32(); index.ReadInt32(); - index.ReadInt32(); + if (version < 2) + index.ReadInt32(); entry.Offset = index.ReadUInt32() + base_offset; entry.Size = index.ReadUInt32(); if (!entry.CheckPlacement (file.MaxOffset))