Refuse to load maps exceeding the bsp29 clipnode limit. This avoids possible infinite loops or other weirdness in favour of a clear error. The QBSP really ought to be doing this too.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6146 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
423b549fa8
commit
cfaef2bf11
1 changed files with 5 additions and 0 deletions
|
@ -4691,6 +4691,11 @@ static qboolean Mod_LoadClipnodes (model_t *loadmodel, qbyte *mod_base, lump_t *
|
|||
Con_Printf (CON_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
|
||||
return false;
|
||||
}
|
||||
if (count > (1u<<16))
|
||||
{
|
||||
Con_Printf (CON_ERROR "%s: clipnode count exceeds 16bit limit (%u). Try bsp2.\n", loadmodel->name, count);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
out = ZG_Malloc(&loadmodel->memgroup, count*sizeof(*out));//space for both
|
||||
|
||||
|
|
Loading…
Reference in a new issue