(BPC): fixed BPP sanity check.

This commit is contained in:
morkt 2017-11-23 01:21:14 +04:00
parent 5bd5568719
commit 979582304c

View File

@ -44,7 +44,7 @@ namespace GameRes.Formats.CsWare
uint width = header.ToUInt32 (4); uint width = header.ToUInt32 (4);
uint height = header.ToUInt32 (8); uint height = header.ToUInt32 (8);
int bpp = header.ToUInt16 (0xE); int bpp = header.ToUInt16 (0xE);
if (bpp != 2 && bpp != 8 && bpp != 24) if (bpp != 1 && bpp != 8 && bpp != 24)
return null; return null;
return new ImageMetaData { Width = width, Height = height, BPP = bpp }; return new ImageMetaData { Width = width, Height = height, BPP = bpp };
} }