diff options
Diffstat (limited to 'dep/recastnavigation/Recast/RecastMesh.cpp')
-rw-r--r-- | dep/recastnavigation/Recast/RecastMesh.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/dep/recastnavigation/Recast/RecastMesh.cpp b/dep/recastnavigation/Recast/RecastMesh.cpp index 23a466053b1..13aad2af01c 100644 --- a/dep/recastnavigation/Recast/RecastMesh.cpp +++ b/dep/recastnavigation/Recast/RecastMesh.cpp @@ -1105,9 +1105,7 @@ bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMe unsigned short* pa = &polys[bestPa*nvp]; unsigned short* pb = &polys[bestPb*nvp]; mergePolys(pa, pb, bestEa, bestEb, tmpPoly, nvp); - unsigned short* lastPoly = &polys[(npolys-1)*nvp]; - if (pb != lastPoly) - memcpy(pb, lastPoly, sizeof(unsigned short)*nvp); + memcpy(pb, &polys[(npolys-1)*nvp], sizeof(unsigned short)*nvp); npolys--; } else |