From c61442e960247e309ebcccaf789367133ffdec5c Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 4 Dec 2022 05:20:10 +0300 Subject: [PATCH] engine: imagelib: simplify string operation --- engine/common/imagelib/img_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/common/imagelib/img_main.c b/engine/common/imagelib/img_main.c index 1b99e0c0..51c4b0ac 100644 --- a/engine/common/imagelib/img_main.c +++ b/engine/common/imagelib/img_main.c @@ -224,7 +224,7 @@ rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size ) Q_strncpy( loadname, filename, sizeof( loadname )); Image_Reset(); // clear old image - if( Q_stricmp( ext, "" )) + if( COM_CheckStringEmpty( ext )) { // we needs to compare file extension with list of supported formats // and be sure what is real extension, not a filename with dot @@ -355,7 +355,7 @@ writes image as any known format qboolean FS_SaveImage( const char *filename, rgbdata_t *pix ) { const char *ext = COM_FileExtension( filename ); - qboolean anyformat = !Q_stricmp( ext, "" ) ? true : false; + qboolean anyformat = !COM_CheckStringEmpty( ext ); string path, savename; const savepixformat_t *format;