From c754ac6e62c049ebf5510f6c92cabf9f6ee2682f Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 10 Apr 2019 09:30:49 +0000 Subject: [PATCH] Limit lastwall() to 'numwalls' iterations instead of MAXWALLS git-svn-id: https://svn.eduke32.com/eduke32@7569 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 56872b9cb..6399dcf3b 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -10920,7 +10920,7 @@ int32_t lastwall(int16_t point) if (point > 0 && wall[point-1].point2 == point) return point-1; - int i = point, cnt = MAXWALLS; + int i = point, cnt = numwalls; do { int const j = wall[i].point2;