Skip to content

Commit

Permalink
utils: mdldec: fix wrong conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon authored and a1batross committed Dec 28, 2023
1 parent f705a7c commit 520fc33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/mdldec/mdldec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 520fc33

Please sign in to comment.