From 2be6c741d9d2aa5b95651802524576a9e2e32b3b Mon Sep 17 00:00:00 2001 From: CarlOlson Date: Sun, 28 Aug 2022 15:16:00 +0900 Subject: [PATCH] fix uuninitialized value in stroke mesh builder --- dust3d/mesh/stroke_mesh_builder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dust3d/mesh/stroke_mesh_builder.cc b/dust3d/mesh/stroke_mesh_builder.cc index 01b3842d..7158d6ad 100644 --- a/dust3d/mesh/stroke_mesh_builder.cc +++ b/dust3d/mesh/stroke_mesh_builder.cc @@ -451,7 +451,7 @@ void StrokeMeshBuilder::localAverageBaseNormals() size_t h, j; if (m_isRing) { h = (i + m_nodeIndices.size() - 1) % m_nodeIndices.size(); - j = (j + 1) % m_nodeIndices.size(); + j = (i + 1) % m_nodeIndices.size(); } else { h = i > 0 ? i - 1 : i; j = i + 1 < m_nodeIndices.size() ? i + 1 : i;