recast4j - c3ffe19 - [Upstream] Fix for out of bounds read in tile cache builder

This commit is contained in:
ikpil 2023-03-18 11:46:57 +09:00
parent 061f8dad69
commit 865fd13b24
1 changed files with 1 additions and 1 deletions

View File

@ -1492,7 +1492,7 @@ namespace DotRecast.Detour.TileCache
} }
// Remove vertex. // Remove vertex.
for (int i = rem; i < mesh.nverts; ++i) for (int i = rem; i < mesh.nverts - 1; ++i)
{ {
mesh.verts[i * 3 + 0] = mesh.verts[(i + 1) * 3 + 0]; mesh.verts[i * 3 + 0] = mesh.verts[(i + 1) * 3 + 0];
mesh.verts[i * 3 + 1] = mesh.verts[(i + 1) * 3 + 1]; mesh.verts[i * 3 + 1] = mesh.verts[(i + 1) * 3 + 1];