From 871784333358c66d6ed133f5a26a4cc084ec0cdc Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Tue, 22 Nov 2022 22:14:58 +0400 Subject: [PATCH] engine: common: imagelib: fixed BMP files estimate size calculation with NPOT textures --- engine/common/imagelib/img_bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/common/imagelib/img_bmp.c b/engine/common/imagelib/img_bmp.c index c81c3701..1fa0c4c3 100644 --- a/engine/common/imagelib/img_bmp.c +++ b/engine/common/imagelib/img_bmp.c @@ -174,7 +174,7 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi break; } - estimatedSize = ( buf_p - buffer ) + ( image.width + padSize ) * image.height * ( bhdr.bitsPerPixel >> 3 ); + estimatedSize = ( buf_p - buffer ) + image.width * image.height * ( bhdr.bitsPerPixel >> 3 ); if( filesize < estimatedSize ) { if( image.palette )