From 86ad4f654c20c9b6aca74721ac93b5df28796206 Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 21 May 2020 00:29:11 -0600 Subject: [PATCH] Fix bug with Mesh:setVertices; --- src/api/l_graphics_mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/l_graphics_mesh.c b/src/api/l_graphics_mesh.c index 3610dd0b..40f95329 100644 --- a/src/api/l_graphics_mesh.c +++ b/src/api/l_graphics_mesh.c @@ -315,7 +315,7 @@ static int l_lovrMeshSetVertices(lua_State* L) { luaL_checktype(L, -1, LUA_TTABLE); int component = 0; for (uint32_t j = 0; j < attributeCount; j++) { - const MeshAttribute* attribute = lovrMeshGetAttribute(mesh, i); + const MeshAttribute* attribute = lovrMeshGetAttribute(mesh, j); if (attribute->buffer != buffer) { break; }