From 83d615565ba8e760fac17025d8d2e87b2ad7b46a Mon Sep 17 00:00:00 2001 From: Luc Girod Date: Mon, 5 May 2014 03:26:16 +0200 Subject: [PATCH] Bug in sweet_geometry_subdivide_mesh_vt --- sweet_geometry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sweet_geometry.c b/sweet_geometry.c index a1cdd96..3bb81e9 100644 --- a/sweet_geometry.c +++ b/sweet_geometry.c @@ -397,7 +397,7 @@ sweet_geometry_subdivide_mesh_vt (unsigned int nb_iterations, float scale, (*mesh_indices) = malloc (nb_faces * 3 * sizeof (unsigned int)); (*mesh_vertices) = malloc (v.nb_vertices * sizeof (float) * 3); - (*mesh_tcoord) = malloc ((*count_vertices) * sizeof (float) * 2); + (*mesh_tcoord) = malloc (t.nb_uv * sizeof (float) * 2); if ((*mesh_indices) == NULL || (*mesh_vertices) == NULL || (*mesh_tcoord) == NULL) {