mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-08 21:31:46 +08:00
engine: client: fix incorrect usage of Mod_TestBmodelLumps return value in Cmd_ListMaps, causing it to crash
This commit is contained in:
@@ -86,13 +86,15 @@ int Cmd_ListMaps( search_t *t, char *lastmapname, size_t len )
|
||||
filelen = FS_Read( f, buf, sizeof( buf ));
|
||||
|
||||
// check all the lumps and some other errors
|
||||
if( Mod_TestBmodelLumps( f, t->filenames[i], buf, filelen, true, &entities ))
|
||||
if( !Mod_TestBmodelLumps( f, t->filenames[i], buf, filelen, true, &entities ))
|
||||
{
|
||||
lumpofs = entities.fileofs;
|
||||
lumplen = entities.filelen;
|
||||
ver = header->version;
|
||||
FS_Close( f );
|
||||
continue;
|
||||
}
|
||||
|
||||
lumpofs = entities.fileofs;
|
||||
lumplen = entities.filelen;
|
||||
|
||||
header = (dheader_t *)buf;
|
||||
hdrext = (dextrahdr_t *)((byte *)buf + sizeof( dheader_t ));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user