Fixed bug where removeVertex() would crash with certain meshes because vflags array was not adjusted properly.
This commit is contained in:
parent
1a87422676
commit
6e8581400a
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user