diff --git a/Legacy/Akatombo/ArcX.cs b/Legacy/Akatombo/ArcX.cs index f4efb660..263ec7f8 100644 --- a/Legacy/Akatombo/ArcX.cs +++ b/Legacy/Akatombo/ArcX.cs @@ -28,12 +28,12 @@ using System.Collections.Generic; using System.ComponentModel.Composition; using System.IO; +// [980515][Akatonbo] Succubus ~Ochita Tenshi~ + namespace GameRes.Formats.Akatombo { -#if DEBUG [Export(typeof(ArchiveFormat))] -#endif - public class PakOpener : ArchiveFormat + public class XOpener : ArchiveFormat { public override string Tag { get { return "X/AKATOMBO"; } } public override string Description { get { return "Akatombo resource archive"; } } @@ -60,13 +60,13 @@ namespace GameRes.Formats.Akatombo Offset = next_offset, }; next_offset = file.View.ReadUInt32 (index_offset); - if (next_offset < entry.Offset) + if (next_offset < entry.Offset || next_offset > file.MaxOffset) return null; entry.Size = (uint)(next_offset - entry.Offset); - if (!entry.CheckPlacement (file.MaxOffset)) - return null; dir.Add (entry); } + if (next_offset != file.MaxOffset) + return null; foreach (var entry in dir) { uint signature = file.View.ReadUInt32 (entry.Offset);