mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(BPC): fixed BPP sanity check.
This commit is contained in:
parent
5bd5568719
commit
979582304c
@ -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 };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user