From 392188c9089632d247d2b792cb305af8afc6d0d8 Mon Sep 17 00:00:00 2001 From: codifies Date: Thu, 8 Oct 2020 12:16:21 +0100 Subject: [PATCH] minor fix for warning --- src/models.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/models.c b/src/models.c index ce2992701..cfed95022 100644 --- a/src/models.c +++ b/src/models.c @@ -889,7 +889,7 @@ void ExportMesh(Mesh mesh, const char *fileName) Material *LoadMaterials(const char *fileName, int *materialCount) { Material *materials = NULL; - size_t count = 0; + unsigned int count = 0; // TODO: Support IQM and GLTF for materials parsing @@ -2987,13 +2987,12 @@ static Model LoadOBJ(const char *fileName) { model.materialCount = materialCount; model.materials = (Material *)RL_CALLOC(model.materialCount, sizeof(Material)); + TraceLog(LOG_INFO, "MODEL: model has %i material meshes", materialCount); } else { model.meshCount = 1; TraceLog(LOG_INFO, "MODEL: No materials, putting all meshes in a default material"); } - TraceLog(LOG_INFO, "MODEL: model has %i material meshes", meshCount); - model.meshes = (Mesh *)RL_CALLOC(model.meshCount, sizeof(Mesh)); model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int));