previous cast didn't work, this one does

This commit is contained in:
ShaiyaJ 2026-05-27 04:10:32 +01:00
parent 66d29db5fb
commit f0731da192

View File

@ -737,8 +737,8 @@ par_shapes_mesh* par_shapes_create_disk(float radius, int slices,
*norms++ = nnormal[1];
*norms++ = nnormal[2];
}
mesh->ntriangles = (unsigned int) slices;
mesh->triangles = PAR_MALLOC(PAR_SHAPES_T, 3 * mesh->ntriangles);
mesh->ntriangles = slices;
mesh->triangles = PAR_MALLOC(PAR_SHAPES_T, 3 * (unsigned int) mesh->ntriangles);
PAR_SHAPES_T* triangles = mesh->triangles;
for (int i = 0; i < slices; i++) {
*triangles++ = 0;