- do not use index 0 of Blood's X arrays.

This can be written to through uninitialized data and break things quite badly.
This commit is contained in:
Christoph Oelckers 2020-10-14 01:17:41 +02:00
parent be42a6e28d
commit ec5762f024

View file

@ -333,7 +333,7 @@ void dbInit(void)
{ {
xsprite[i].reference = -1; xsprite[i].reference = -1;
} }
XWallsUsed = XSectorsUsed = 0; XWallsUsed = XSectorsUsed = 1; // 0 is not usable because it's the default for 'extra' and some code actually uses it to clobber the contents in here. :(
for (int i = 1; i < kMaxXWalls; i++) for (int i = 1; i < kMaxXWalls; i++)
{ {
xwall[i].reference = -1; xwall[i].reference = -1;