From 15635ec7c82e1dfa7a1fe70bb2931ce7defd6352 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 11 Jun 2021 23:18:46 +0200 Subject: [PATCH] - fixed crash when trying to triangulate broken sectors. In these cases it is possible that the wall index may go below 0. --- source/core/sectorgeometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/sectorgeometry.cpp b/source/core/sectorgeometry.cpp index 801c7889e..ec6131442 100644 --- a/source/core/sectorgeometry.cpp +++ b/source/core/sectorgeometry.cpp @@ -241,7 +241,7 @@ bool SectorGeometry::MakeVertices(unsigned int secnum, int plane, const FVector2 int start = 0; while (done[start] && start < numvertices) start++; int s = start; - if (start < numvertices) + if (start >= 0 && start < numvertices) { while (!done[start]) {