Limit lastwall() to 'numwalls' iterations instead of MAXWALLS

git-svn-id: https://svn.eduke32.com/eduke32@7569 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-04-10 09:30:49 +00:00 committed by Christoph Oelckers
parent c8eb1d0368
commit c754ac6e62

View file

@ -10920,7 +10920,7 @@ int32_t lastwall(int16_t point)
if (point > 0 && wall[point-1].point2 == point) if (point > 0 && wall[point-1].point2 == point)
return point-1; return point-1;
int i = point, cnt = MAXWALLS; int i = point, cnt = numwalls;
do do
{ {
int const j = wall[i].point2; int const j = wall[i].point2;