(XOpener): enabled in release build.

This commit is contained in:
morkt 2018-12-19 03:36:15 +04:00
parent d75bc26cbc
commit 85ecdb4b95

View File

@ -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);