mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
Mod_DecompressVis: warn every case of vis data buffer overrun, not once.
also remove the #if 0'ed out code. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1550 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
03ddf3522d
commit
a7deed353e
1 changed files with 1 additions and 10 deletions
|
@ -146,9 +146,6 @@ byte *Mod_DecompressVis (byte *in, qmodel_t *model)
|
|||
out = mod_decompressed;
|
||||
outend = mod_decompressed + row;
|
||||
|
||||
#if 0
|
||||
memcpy (out, in, row);
|
||||
#else
|
||||
if (!in)
|
||||
{ // no vis info, so make all visible
|
||||
while (row)
|
||||
|
@ -173,19 +170,13 @@ byte *Mod_DecompressVis (byte *in, qmodel_t *model)
|
|||
{
|
||||
if (out == outend)
|
||||
{
|
||||
static qboolean warned = false;
|
||||
if (!warned)
|
||||
{
|
||||
warned = true;
|
||||
Con_Printf("Mod_DecompressVis: output overrun on model \"%s\"\n", model->name);
|
||||
}
|
||||
Con_Warning("Mod_DecompressVis: output overrun on model \"%s\"\n", model->name);
|
||||
return mod_decompressed;
|
||||
}
|
||||
*out++ = 0;
|
||||
c--;
|
||||
}
|
||||
} while (out - mod_decompressed < row);
|
||||
#endif
|
||||
|
||||
return mod_decompressed;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue