mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Fix crash when passing updatesectorz() an invalid sector number > numsectors and < MAXSECTORS
git-svn-id: https://svn.eduke32.com/eduke32@7549 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e8a401759d
commit
030f0b7013
1 changed files with 1 additions and 1 deletions
|
@ -11057,7 +11057,7 @@ void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int16_t *
|
|||
|
||||
if ((unsigned)*sectnum >= (unsigned)numsectors)
|
||||
{
|
||||
if ((unsigned)*sectnum < (unsigned)numsectors + MAXSECTORS)
|
||||
if (*sectnum >= MAXSECTORS && (unsigned)*sectnum < (unsigned)numsectors + MAXSECTORS)
|
||||
{
|
||||
*sectnum -= MAXSECTORS;
|
||||
nofirstzcheck = true;
|
||||
|
|
Loading…
Reference in a new issue