Skip to content

Commit 12c9571

Browse files
author
sezero
committed
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@1550 af15c1b1-3010-417e-b628-4374ebc0bcbd
1 parent 59b511d commit 12c9571

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

quakespasm/Quake/gl_model.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ byte *Mod_DecompressVis (byte *in, qmodel_t *model)
146146
out = mod_decompressed;
147147
outend = mod_decompressed + row;
148148

149-
#if 0
150-
memcpy (out, in, row);
151-
#else
152149
if (!in)
153150
{ // no vis info, so make all visible
154151
while (row)
@@ -173,19 +170,13 @@ byte *Mod_DecompressVis (byte *in, qmodel_t *model)
173170
{
174171
if (out == outend)
175172
{
176-
static qboolean warned = false;
177-
if (!warned)
178-
{
179-
warned = true;
180-
Con_Printf("Mod_DecompressVis: output overrun on model \"%s\"\n", model->name);
181-
}
173+
Con_Warning("Mod_DecompressVis: output overrun on model \"%s\"\n", model->name);
182174
return mod_decompressed;
183175
}
184176
*out++ = 0;
185177
c--;
186178
}
187179
} while (out - mod_decompressed < row);
188-
#endif
189180

190181
return mod_decompressed;
191182
}

0 commit comments

Comments
 (0)