From 9b11b8a27b42782ea528b1b2f5e2f884352bdb13 Mon Sep 17 00:00:00 2001 From: elsid Date: Wed, 18 Nov 2020 18:52:00 +0100 Subject: [PATCH] Fix boundary check --- components/detournavigator/chunkytrimesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/detournavigator/chunkytrimesh.cpp b/components/detournavigator/chunkytrimesh.cpp index 3a8fc34802..ffd39d0a97 100644 --- a/components/detournavigator/chunkytrimesh.cpp +++ b/components/detournavigator/chunkytrimesh.cpp @@ -51,7 +51,7 @@ namespace DetourNavigator const auto inum = imax - imin; const auto icur = curNode; - if (curNode > nodes.size()) + if (curNode >= nodes.size()) return; ChunkyTriMeshNode& node = nodes[curNode++];