From be4a8072421c9c0091c8ddfc57854eb327d925d0 Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Fri, 5 Feb 2010 06:50:08 +0000 Subject: [PATCH] fix for Issue 40: RecastMesh.cpp : removeVertex bad indexing --- Recast/Source/RecastMesh.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Recast/Source/RecastMesh.cpp b/Recast/Source/RecastMesh.cpp index d60f650..c703f9a 100644 --- a/Recast/Source/RecastMesh.cpp +++ b/Recast/Source/RecastMesh.cpp @@ -592,10 +592,9 @@ static bool removeVertex(rcPolyMesh& mesh, const unsigned short rem, const int m // Start with one vertex, keep appending connected // segments to the start and end of the hole. - hole[nhole] = edges[0]; - hreg[nhole] = edges[2]; - harea[nhole] = edges[3]; - nhole++; + pushBack(edges[0], hole, nhole); + pushBack(edges[2], hreg, nhreg); + pushBack(edges[3], harea, nharea); while (nedges) {