mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-10 12:41:39 +00:00
engine: imagelib: img_ktx2: don't allow to load images with no mip levels
This commit is contained in:
parent
683c4874f8
commit
a675806c91
@ -87,6 +87,12 @@ static qboolean Image_KTX2Parse( const ktx2_header_t *header, const byte *buffer
|
||||
return false;
|
||||
}
|
||||
|
||||
if( header->levelCount == 0 )
|
||||
{
|
||||
Con_DPrintf( S_ERROR "%s: file has no mip levels\n", __FUNCTION__ );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( header->pixelDepth > 1 )
|
||||
{
|
||||
Con_DPrintf( S_ERROR "%s: unsupported KTX2 pixelDepth %d\n", __FUNCTION__, header->pixelDepth );
|
||||
|
Loading…
x
Reference in New Issue
Block a user