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
This commit is contained in:
terminx 2018-11-18 18:11:56 +00:00
parent 6618883d7e
commit 23308603c5

View file

@ -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;