mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- fixed OOB access in pushmove.
The backwards search loop starts at one element behind the data it is supposed to check. If this is the last wall in the map it accesses undefined memory. This tripped the range check in TArray for wall[].
This commit is contained in:
parent
4562a0ca97
commit
a23d2ae656
1 changed files with 1 additions and 1 deletions
|
@ -868,7 +868,7 @@ int pushmove_(vec3_t *const vect, int *const sectnum,
|
|||
if (dir > 0)
|
||||
startwall = sec->wallptr, endwall = startwall + sec->wallnum;
|
||||
else
|
||||
endwall = sec->wallptr, startwall = endwall + sec->wallnum;
|
||||
endwall = sec->wallptr - 1, startwall = endwall + sec->wallnum - 1;
|
||||
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Reference in a new issue