diff --git a/DetourTileCache/Source/DetourTileCacheBuilder.cpp b/DetourTileCache/Source/DetourTileCacheBuilder.cpp index 3921a17..eb575c9 100644 --- a/DetourTileCache/Source/DetourTileCacheBuilder.cpp +++ b/DetourTileCache/Source/DetourTileCacheBuilder.cpp @@ -1370,7 +1370,7 @@ static void mergePolys(unsigned short* pa, unsigned short* pb, int ea, int eb) const int nb = countPolyVerts(pb); // Merge polygons. - memset(tmp, 0xff, sizeof(unsigned short)*MAX_VERTS_PER_POLY); + memset(tmp, 0xff, sizeof(unsigned short)*MAX_VERTS_PER_POLY*2); int n = 0; // Add pa for (int i = 0; i < na-1; ++i) diff --git a/RecastDemo/Source/Sample_TempObstacles.cpp b/RecastDemo/Source/Sample_TempObstacles.cpp index 714c6a1..edfb842 100644 --- a/RecastDemo/Source/Sample_TempObstacles.cpp +++ b/RecastDemo/Source/Sample_TempObstacles.cpp @@ -1336,8 +1336,7 @@ bool Sample_TempObstacles::handleBuild() void Sample_TempObstacles::handleUpdate(const float dt) { - if (m_tool) - m_tool->handleUpdate(dt); + Sample::handleUpdate(dt); if (!m_navMesh) return;