mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 04:14:13 +08:00
(DatOpener): define signatures in constructor.
This commit is contained in:
parent
9ae74ce5bb
commit
cc297869e5
@ -78,13 +78,11 @@ namespace GameRes.Formats.BlackRainbow
|
|||||||
public DatOpener ()
|
public DatOpener ()
|
||||||
{
|
{
|
||||||
Extensions = new string[] { "dat", "pak" };
|
Extensions = new string[] { "dat", "pak" };
|
||||||
|
Signatures = new uint[] { 2u, 4u, 5u };
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
uint sig = file.View.ReadUInt32 (0);
|
|
||||||
if (sig != 2 && sig != 4 && sig != 5)
|
|
||||||
return null;
|
|
||||||
int count = file.View.ReadInt32 (8);
|
int count = file.View.ReadInt32 (8);
|
||||||
if (count <= 0 || count > 0x1ffff)
|
if (count <= 0 || count > 0x1ffff)
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user