mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix a potential sector[-1] access when drawing a masked wall in Polymost.
git-svn-id: https://svn.eduke32.com/eduke32@2280 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f96cc343a2
commit
c657588658
1 changed files with 9 additions and 0 deletions
|
@ -4550,6 +4550,10 @@ void polymost_drawrooms()
|
|||
|
||||
numscans = numbunches = 0;
|
||||
|
||||
// MASKWALL_BAD_ACCESS
|
||||
// Fixes access of stale maskwall[maskwallcnt] (a "scan" index, in BUILD lingo):
|
||||
maskwallcnt = 0;
|
||||
|
||||
if (globalcursectnum >= MAXSECTORS)
|
||||
globalcursectnum -= MAXSECTORS;
|
||||
else
|
||||
|
@ -4624,6 +4628,11 @@ void polymost_drawmaskwall(int32_t damaskwallcnt)
|
|||
z = maskwall[damaskwallcnt];
|
||||
wal = &wall[thewall[z]]; wal2 = &wall[wal->point2];
|
||||
sectnum = thesector[z]; sec = §or[sectnum];
|
||||
|
||||
// if (wal->nextsector < 0) return;
|
||||
// Without MASKWALL_BAD_ACCESS fix:
|
||||
// wal->nextsector is -1, WGR2 SVN Lochwood Hollow (Til' Death L1) (or trueror1.map)
|
||||
|
||||
nsec = §or[wal->nextsector];
|
||||
z1 = max(nsec->ceilingz,sec->ceilingz);
|
||||
z2 = min(nsec->floorz,sec->floorz);
|
||||
|
|
Loading…
Reference in a new issue