mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
Fix a sector[-1] access when starting to draw a wall in an empty map.
git-svn-id: https://svn.eduke32.com/eduke32@2305 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
39509680b6
commit
20741efd3b
1 changed files with 3 additions and 3 deletions
|
@ -3090,14 +3090,14 @@ void overheadeditor(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
i = numwalls-1;
|
i = numwalls-1;
|
||||||
j = numsectors-1;
|
j = numsectors-1; // might be -1 if empty map!
|
||||||
if (newnumwalls >= 0)
|
if (newnumwalls >= 0)
|
||||||
i = newnumwalls-1;
|
i = newnumwalls-1;
|
||||||
for (; i>=0; i--)
|
for (; i>=0; i--)
|
||||||
{
|
{
|
||||||
const walltype *wal = &wall[i];
|
const walltype *wal = &wall[i];
|
||||||
|
|
||||||
if (sector[j].wallptr > i)
|
if (j>=0 && sector[j].wallptr > i)
|
||||||
j--;
|
j--;
|
||||||
|
|
||||||
if (zoom < 768 && !(wal->cstat & (1<<14)))
|
if (zoom < 768 && !(wal->cstat & (1<<14)))
|
||||||
|
@ -3115,7 +3115,7 @@ void overheadeditor(void)
|
||||||
dax = (wal->x+wall[wal->point2].x)>>1;
|
dax = (wal->x+wall[wal->point2].x)>>1;
|
||||||
day = (wal->y+wall[wal->point2].y)>>1;
|
day = (wal->y+wall[wal->point2].y)>>1;
|
||||||
drawsmallabel(dabuffer, editorcolors[0], editorcolors[31],
|
drawsmallabel(dabuffer, editorcolors[0], editorcolors[31],
|
||||||
dax, day, getflorzofslope(j, dax,day));
|
dax, day, (i >= numwalls || j<0) ? 0 : getflorzofslope(j, dax,day));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue