More corrupt map checks.

git-svn-id: https://svn.eduke32.com/eduke32@1395 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-05-31 18:16:14 +00:00
parent 2997d1e0f5
commit 930689d468

View file

@ -2202,6 +2202,8 @@ static void polymer_updatewall(int16_t wallnum)
// it also works, bitches // it also works, bitches
wal = &wall[wallnum]; wal = &wall[wallnum];
nwallnum = wal->nextwall; nwallnum = wal->nextwall;
if (sectorofwall(wallnum) == -1)
return; // yay, corrupt map
sec = &sector[sectorofwall(wallnum)]; sec = &sector[sectorofwall(wallnum)];
if (sec->wallptr > wallnum) if (sec->wallptr > wallnum)
return; // the map is horribly corrupt return; // the map is horribly corrupt