summaryrefslogtreecommitdiffhomepage
path: root/src/rmodels.c
diff options
context:
space:
mode:
authorkolunmi <[email protected]>2024-01-11 11:49:25 -0700
committerGitHub <[email protected]>2024-01-11 19:49:25 +0100
commit9d628d1d499f8ad9c0e6fbed69914cecb611d6cd (patch)
tree3b62e190ce12d7a845d0f4c5703b8a2dd59fb483 /src/rmodels.c
parent482722d881e98d84773af97838b6604331ae5538 (diff)
downloadraylib-9d628d1d499f8ad9c0e6fbed69914cecb611d6cd.tar.gz
raylib-9d628d1d499f8ad9c0e6fbed69914cecb611d6cd.zip
Enable animation names for the m3d model format. (#3714)
Diffstat (limited to 'src/rmodels.c')
-rw-r--r--src/rmodels.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rmodels.c b/src/rmodels.c
index 41714224..ede87a1b 100644
--- a/src/rmodels.c
+++ b/src/rmodels.c
@@ -6050,7 +6050,8 @@ static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCou
animations[a].boneCount = m3d->numbone + 1;
animations[a].bones = RL_MALLOC((m3d->numbone + 1)*sizeof(BoneInfo));
animations[a].framePoses = RL_MALLOC(animations[a].frameCount*sizeof(Transform *));
- // strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
+ strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
+ animations[a].name[sizeof(animations[a].name) - 1] = '\0';
TRACELOG(LOG_INFO, "MODEL: [%s] animation #%i: %i msec, %i frames", fileName, a, m3d->action[a].durationmsec, animations[a].frameCount);
for (i = 0; i < (int)m3d->numbone; i++)