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++];