mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
commit
a20aa9434c
@ -44,7 +44,7 @@ namespace GameRes.Formats.ISM
|
|||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
if (!file.View.AsciiEqual (4, "ARCHIVED"))
|
if (!file.View.AsciiEqual (4, "ARCHIVED") && !file.View.AsciiEqual(4, "ENGLISH "))
|
||||||
return null;
|
return null;
|
||||||
int count = file.View.ReadInt16 (0x0C);
|
int count = file.View.ReadInt16 (0x0C);
|
||||||
if (!IsSaneCount (count))
|
if (!IsSaneCount (count))
|
||||||
|
@ -54,7 +54,8 @@ namespace GameRes.Formats.Seraphim
|
|||||||
public override ImageMetaData ReadMetaData (IBinaryStream stream)
|
public override ImageMetaData ReadMetaData (IBinaryStream stream)
|
||||||
{
|
{
|
||||||
var header = stream.ReadHeader (0x10);
|
var header = stream.ReadHeader (0x10);
|
||||||
if ('C' != header[0] || 'F' != header[1] || 0 != header[3])
|
uint sig = header.ToUInt16(0);
|
||||||
|
if (sig != Signature)
|
||||||
return null;
|
return null;
|
||||||
int packed_size = header.ToInt32 (12);
|
int packed_size = header.ToInt32 (12);
|
||||||
if (packed_size <= 0 || packed_size > stream.Length-0x10)
|
if (packed_size <= 0 || packed_size > stream.Length-0x10)
|
||||||
|
Loading…
Reference in New Issue
Block a user