mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-09-29 13:36:22 +00:00
Fixed bug where removeVertex() would crash with certain meshes because vflags array was not adjusted properly.
This commit is contained in:
@@ -997,7 +997,8 @@ bool rcBuildPolyMesh(rcContourSet& cset, int nvp, rcPolyMesh& mesh)
|
||||
rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Failed to remove edge vertex %d.", i);
|
||||
return false;
|
||||
}
|
||||
for (int j = i; j < mesh.nverts-1; ++j)
|
||||
// Note: mesh.nverts is already decremented inside removeVertex()!
|
||||
for (int j = i; j < mesh.nverts; ++j)
|
||||
vflags[j] = vflags[j+1];
|
||||
--i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user