From 23308603c5317c03a092c14f37272a9657b2eb49 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 18 Nov 2018 18:11:56 +0000 Subject: [PATCH] Prevent crash in the editor if newnumwalls and numwalls are both somehow -1 git-svn-id: https://svn.eduke32.com/eduke32@7207 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/build.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/build.cpp b/source/build/src/build.cpp index 36114ecc2..9f9ebd075 100644 --- a/source/build/src/build.cpp +++ b/source/build/src/build.cpp @@ -3490,7 +3490,7 @@ void overheadeditor(void) linehighlight2 = getlinehighlight(mousxplc, mousyplc, linehighlight, 1); } - if (newnumwalls >= numwalls) + if ((unsigned)newnumwalls < MAXWALLS && newnumwalls >= numwalls) { // if we're in the process of drawing a wall, set the end point's coordinates dax = mousxplc;