mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(AfaOpener): check archive version.
This commit is contained in:
parent
fda4f26845
commit
0a73f4f96e
@ -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<Entry> (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))
|
||||
|
Loading…
Reference in New Issue
Block a user