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:
Ozkan Sezer 2018-01-08 08:28:17 +00:00
parent 03ddf3522d
commit a7deed353e
1 changed files with 1 additions and 10 deletions

View File

@ -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;
}