Skip to content

Conversation

@VitoTringolo
Copy link
Contributor

src/rmodels.c Outdated
{
cgltf_node node = *skin.joints[i];
strncpy(bones[i].name, node.name, sizeof(bones[i].name));
if (node.name != NULL) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, could you avoid the brackets, in raylib one line statements use no-brackets:

if (node.name != NULL) strncpy(bones[i].name, node.name, sizeof(bones[i].name));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! And sorry, I missed this code convention!

@raysan5 raysan5 changed the title LoadBoneInfoGLTF add check for animation name being NULL [rmodels] LoadBoneInfoGLTF(), add check for animation name being NULL Jun 10, 2024
@VitoTringolo VitoTringolo force-pushed the gltf-bone-null-check branch from a5224f6 to 00d7e8c Compare June 11, 2024 09:10
@raysan5 raysan5 merged commit 0fc4b61 into raysan5:master Jun 11, 2024
@raysan5
Copy link
Owner

raysan5 commented Jun 11, 2024

@VitoTringolo thanks for the review!

@VitoTringolo VitoTringolo deleted the gltf-bone-null-check branch June 30, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants