From b967d505ec386d9fb5112f462f6c1afa516ebaf3 Mon Sep 17 00:00:00 2001 From: Dir-A Date: Tue, 24 Sep 2024 04:17:30 +0800 Subject: [PATCH] Update ImageSeraph.cs fix image format check --- ArcFormats/Seraphim/ImageSeraph.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArcFormats/Seraphim/ImageSeraph.cs b/ArcFormats/Seraphim/ImageSeraph.cs index 9aabea24..2d8625d8 100644 --- a/ArcFormats/Seraphim/ImageSeraph.cs +++ b/ArcFormats/Seraphim/ImageSeraph.cs @@ -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)