mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(UsfOpener): additional sanity check.
This commit is contained in:
parent
466fec5ff8
commit
a70cc6a251
@ -45,7 +45,7 @@ namespace GameRes.Formats.WestGate
|
|||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
uint first_offset = file.View.ReadUInt32 (0xC);
|
uint first_offset = file.View.ReadUInt32 (0xC);
|
||||||
if (first_offset >= file.MaxOffset)
|
if (first_offset >= file.MaxOffset || 0 != (first_offset & 0xF))
|
||||||
return null;
|
return null;
|
||||||
int count = (int)(first_offset / 0x10);
|
int count = (int)(first_offset / 0x10);
|
||||||
if (!IsSaneCount (count))
|
if (!IsSaneCount (count))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user