diff options
| author | Jeffery Myers <[email protected]> | 2024-02-10 11:02:05 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-10 20:02:05 +0100 |
| commit | 4cd71a975086fa3be3b28d765e45c4bb7dc4e101 (patch) | |
| tree | e8cd9a2a8674804bdd14c1f8a76c1f1887874fcd /src/rmodels.c | |
| parent | dd8b5613cab0d62a2464be5e3b45e835adedea0c (diff) | |
| download | raylib-4cd71a975086fa3be3b28d765e45c4bb7dc4e101.tar.gz raylib-4cd71a975086fa3be3b28d765e45c4bb7dc4e101.zip | |
Fix warnings in raylib (#3793)
Diffstat (limited to 'src/rmodels.c')
| -rw-r--r-- | src/rmodels.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rmodels.c b/src/rmodels.c index 0cb949bc..aef0e7c5 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -5284,7 +5284,8 @@ static Model LoadGLTF(const char *fileName) { // Handle 16-bit unsigned short, vec2 format model.meshes[meshIndex].boneIds = RL_CALLOC(model.meshes[meshIndex].vertexCount*2, sizeof(unsigned short)); - LOAD_ATTRIBUTE(attribute, 2, unsigned short, model.meshes[meshIndex].boneIds) + unsigned short* ptr = (unsigned short*)model.meshes[meshIndex].boneIds; + LOAD_ATTRIBUTE(attribute, 2, unsigned short, ptr) } else if ((attribute->component_type == cgltf_component_type_r_32u) && (attribute->type == cgltf_type_vec4)) { @@ -5296,7 +5297,8 @@ static Model LoadGLTF(const char *fileName) { // Handle 32-bit float, vec2 format model.meshes[meshIndex].boneIds = RL_CALLOC(model.meshes[meshIndex].vertexCount*2, sizeof(float)); - LOAD_ATTRIBUTE(attribute, 2, float, model.meshes[meshIndex].boneIds) + float* ptr = (float*)model.meshes[meshIndex].boneIds; + LOAD_ATTRIBUTE(attribute, 2, float, ptr) } else TRACELOG(LOG_WARNING, "MODEL: [%s] Joint attribute data format not supported", fileName); } |
