mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 05:35:34 +08:00
Update ImageSeraph.cs
fix image format check
This commit is contained in:
parent
4554b82be5
commit
b967d505ec
@ -54,7 +54,8 @@ namespace GameRes.Formats.Seraphim
|
||||
public override ImageMetaData ReadMetaData (IBinaryStream stream)
|
||||
{
|
||||
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;
|
||||
int packed_size = header.ToInt32 (12);
|
||||
if (packed_size <= 0 || packed_size > stream.Length-0x10)
|
||||
|
Loading…
Reference in New Issue
Block a user