Browse Source

love.math.triangulate's error message when there are too few vertices includes the given vert count.

Sasha Szpakowski 8 months ago
parent
commit
8ca321b7d3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/math/wrap_Math.cpp

+ 1 - 1
src/modules/math/wrap_Math.cpp

@@ -179,7 +179,7 @@ int w_triangulate(lua_State *L)
 	}
 
 	if (vertices.size() < 3)
-		return luaL_error(L, "Need at least 3 vertices to triangulate");
+		return luaL_error(L, "Need at least 3 vertices to triangulate (got %d).", (int)vertices.size());
 
 	std::vector<Triangle> triangles;