Fix invalid size of allocated looptris array

Regression in [0], moving to C++ types.

[0]: 321c1af26e
This commit is contained in:
Campbell Barton
2023-12-14 11:05:06 +11:00
parent cdb2f1e1ba
commit 173a4dfbb6

View File

@@ -2777,7 +2777,7 @@ static void mesh_faces_to_scratch(Object *ob)
/* Allocate and copy faces. */
sb->scratch->totface = poly_to_tri_count(mesh->faces_num, mesh->totloop);
blender::Array<MLoopTri> looptri(mesh->totvert);
blender::Array<MLoopTri> looptri(sb->scratch->totface);
blender::bke::mesh::looptris_calc(
mesh->vert_positions(), mesh->faces(), mesh->corner_verts(), looptri);