mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(TryOpen): use IsSaneCount method.
This commit is contained in:
parent
b951729993
commit
0a118f6911
@ -68,7 +68,7 @@ namespace GameRes.Formats
|
||||
using (var header = new BinaryReader (stream))
|
||||
{
|
||||
int entry_count = header.ReadInt32();
|
||||
if (entry_count <= 0)
|
||||
if (!IsSaneCount (entry_count))
|
||||
return null;
|
||||
index_size -= 4;
|
||||
int average_entry_size = index_size / entry_count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user