mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix crash in situations where rendering a scene would overrun all of the MAXBUNCHES sized arrays in both classic and polymost
git-svn-id: https://svn.eduke32.com/eduke32@7447 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5fbc429503
commit
5986dbf6e1
2 changed files with 12 additions and 0 deletions
|
@ -1725,6 +1725,12 @@ static void classicScanSector(int16_t startsectnum)
|
|||
if (dmulscale32(p1.x, p2.y, -p2.x, p1.y) >= 0)
|
||||
goto skipitaddwall;
|
||||
|
||||
if (numscans >= MAXWALLSB-1)
|
||||
{
|
||||
OSD_Printf("!!numscans\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (get_screen_coords(p1, p2, &xb1[numscans], &yb1[numscans], &xb2[numscans], &yb2[numscans]))
|
||||
{
|
||||
// Made it all the way!
|
||||
|
|
|
@ -4963,6 +4963,12 @@ void polymost_scansector(int32_t sectnum)
|
|||
p2 = { (((fp2.y * fcosglobalang) - (fp2.x * fsinglobalang)) * (1.0/64.0)),
|
||||
(((fp2.x * cosviewingrangeglobalang) + (fp2.y * sinviewingrangeglobalang)) * (1.0/64.0)) };
|
||||
|
||||
if (numscans >= MAXWALLSB-1)
|
||||
{
|
||||
OSD_Printf("!!numscans\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//if wall is facing you...
|
||||
if ((p1.y >= SCISDIST || p2.y >= SCISDIST) && (nexttoward(p1.x*p2.y, p2.x*p1.y) < p2.x*p1.y))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue