Semi-hacky fix to R_AddSpriteDefs printing Added -1 frames in 0 sprites
: if the start marker is equal to or beyond the end marker, none of r_things' for (l = startlump; l < endlump; l++)
loops will run, so just assume no sprites.
Simply put, `W_CheckNumForFolderStartPK3` and its `End` equivalent will never return INT16_MAX for nonexistence, and I don't want to break any assumptions elsewhere by modifying those functions directly, so this is the simplest possible fix.
This commit is contained in:
parent
ae2594e5ce
commit
e75490c99d
|
@ -451,7 +451,7 @@ void R_AddSpriteDefs(UINT16 wadnum)
|
||||||
else
|
else
|
||||||
start++; // just after S_START
|
start++; // just after S_START
|
||||||
|
|
||||||
if (end == INT16_MAX)
|
if (end == INT16_MAX || start >= end)
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_SETUP, "no sprites in pwad %d\n", wadnum);
|
CONS_Debug(DBG_SETUP, "no sprites in pwad %d\n", wadnum);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue