Merge pull request #50 from Dir-A/master

Update ArcISA.cs
This commit is contained in:
Crsky 2024-09-24 15:44:44 +08:00 committed by GitHub
commit a20aa9434c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -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))

View File

@ -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)