mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +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))
|
using (var header = new BinaryReader (stream))
|
||||||
{
|
{
|
||||||
int entry_count = header.ReadInt32();
|
int entry_count = header.ReadInt32();
|
||||||
if (entry_count <= 0)
|
if (!IsSaneCount (entry_count))
|
||||||
return null;
|
return null;
|
||||||
index_size -= 4;
|
index_size -= 4;
|
||||||
int average_entry_size = index_size / entry_count;
|
int average_entry_size = index_size / entry_count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user