mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
engine.c: fix potential smostwall[-1] access. Found by ASan.
git-svn-id: https://svn.eduke32.com/eduke32@5807 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bcce4cd531
commit
46f39b725c
1 changed files with 2 additions and 1 deletions
|
@ -5867,8 +5867,9 @@ static void drawmaskwall(int16_t damaskwallcnt)
|
|||
setup_globals_wall1(wal, wal->overpicnum);
|
||||
setup_globals_wall2(wal, sec->visibility, z1, z2);
|
||||
|
||||
for (int i=smostwallcnt-1, j=smostwall[i]; i>=0; j=smostwall[--i])
|
||||
for (int i=smostwallcnt-1; i>=0; i--)
|
||||
{
|
||||
int j=smostwall[i];
|
||||
if ((xb1[j] > xb2[z]) || (xb2[j] < xb1[z])) continue;
|
||||
if (wallfront(j,z)) continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue