2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-25 03:11:06 +01:00

engine: common: imagelib: img_png.c: add a missing return statement.

This commit is contained in:
Andrey Akhmichin 2020-02-11 15:43:35 +05:00 committed by Alibek Omarov
parent 49445f0663
commit 01e2ea24da

View File

@ -204,6 +204,7 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
{
Con_DPrintf( S_ERROR "Image_LoadPNG: IEND chunk has wrong size (%s)\n", name );
Mem_Free( idat_buf );
return false;
}
if( oldsize == 0 )
@ -414,9 +415,11 @@ qboolean Image_SavePNG( const char *name, rgbdata_t *pix )
if( FS_FileExists( name, false ) && !Image_CheckFlag( IL_ALLOW_OVERWRITE ))
return false; // already existed
// bogus parameter check
if( !pix->buffer )
return false;
// get image description
switch( pix->type )
{
case PF_RGB_24: