Skip to content

Commit 9d628d1

Browse files
authored
Enable animation names for the m3d model format. (raysan5#3714)
1 parent 482722d commit 9d628d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rmodels.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -6050,7 +6050,8 @@ static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCou
60506050
animations[a].boneCount = m3d->numbone + 1;
60516051
animations[a].bones = RL_MALLOC((m3d->numbone + 1)*sizeof(BoneInfo));
60526052
animations[a].framePoses = RL_MALLOC(animations[a].frameCount*sizeof(Transform *));
6053-
// strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
6053+
strncpy(animations[a].name, m3d->action[a].name, sizeof(animations[a].name));
6054+
animations[a].name[sizeof(animations[a].name) - 1] = '\0';
60546055
TRACELOG(LOG_INFO, "MODEL: [%s] animation #%i: %i msec, %i frames", fileName, a, m3d->action[a].durationmsec, animations[a].frameCount);
60556056

60566057
for (i = 0; i < (int)m3d->numbone; i++)

0 commit comments

Comments
 (0)