From 520fc33394e4eb3eed4d04bd2d4409069095559a Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Thu, 28 Dec 2023 22:18:41 +0500 Subject: [PATCH] utils: mdldec: fix wrong conditions. --- utils/mdldec/mdldec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/mdldec/mdldec.c b/utils/mdldec/mdldec.c index 05761d77..ee4d4061 100644 --- a/utils/mdldec/mdldec.c +++ b/utils/mdldec/mdldec.c @@ -385,7 +385,7 @@ static qboolean LoadMDL( const char *modelname ) } } - if( filesize < sizeof( studiohdr_t ) || filesize != model_hdr->length ) + if( filesize < sizeof( studiohdr_t ) || filesize != texture_hdr->length ) { fprintf( stderr, "ERROR: Wrong file size! File %s may be corrupted!\n", texturename ); return false; @@ -427,7 +427,7 @@ static qboolean LoadMDL( const char *modelname ) return false; } - if( filesize < sizeof( studiohdr_t ) || filesize != model_hdr->length ) + if( filesize < sizeof( studiohdr_t ) || filesize != anim_hdr[i]->length ) { fprintf( stderr, "ERROR: Wrong file size! File %s may be corrupted!\n", seqgroupname ); return false;