mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- fixed: updatesectorneighborz may not return -1.
This value gets never validated by any caller and isn't really what is wanted in this situation.
This commit is contained in:
parent
74da3e5fa7
commit
8e2d324e85
1 changed files with 3 additions and 2 deletions
|
@ -476,9 +476,10 @@ int32_t spriteheightofsptr(uspriteptr_t spr, int32_t *height, int32_t alsotileyo
|
|||
// 1: floor or down
|
||||
int32_t nextsectorneighborz(int16_t sectnum, int32_t refz, int16_t topbottom, int16_t direction)
|
||||
{
|
||||
int32_t nextz = (direction==1) ? INT32_MAX : INT32_MIN;
|
||||
int32_t sectortouse = -1;
|
||||
int32_t nextz = (direction == 1) ? INT32_MAX : INT32_MIN;
|
||||
int32_t sectortouse = sectnum; // was -1, which is bad because no caller checks it.
|
||||
|
||||
assert(validSectorIndex(sectnum));
|
||||
auto wal = (uwallptr_t)sector[sectnum].firstWall();
|
||||
int32_t i = sector[sectnum].wallnum;
|
||||
|
||||
|
|
Loading…
Reference in a new issue