Skip to content

Commit 2e03c9c

Browse files
authored
Change boneCount field type from int to unsigned int (#5955)
1 parent 65abee1 commit 2e03c9c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/raylib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ typedef struct BoneInfo {
409409

410410
// Skeleton, animation bones hierarchy
411411
typedef struct ModelSkeleton {
412-
int boneCount; // Number of bones
412+
unsigned int boneCount; // Number of bones
413413
BoneInfo *bones; // Bones information (skeleton)
414414
ModelAnimPose bindPose; // Bones base transformation (Transform[])
415415
} ModelSkeleton;
@@ -436,7 +436,7 @@ typedef struct Model {
436436
typedef struct ModelAnimation {
437437
char name[32]; // Animation name
438438

439-
int boneCount; // Number of bones (per pose)
439+
unsigned int boneCount; // Number of bones (per pose)
440440
int keyframeCount; // Number of animation key frames
441441
ModelAnimPose *keyframePoses; // Animation sequence keyframe poses [keyframe][pose]
442442
} ModelAnimation;

src/rmodels.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5369,9 +5369,9 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
53695369
}
53705370

53715371
// Load bone info from GLTF skin data
5372-
static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, int *boneCount)
5372+
static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, unsigned int *boneCount)
53735373
{
5374-
*boneCount = (int)skin.joints_count;
5374+
*boneCount = skin.joints_count;
53755375
BoneInfo *bones = (BoneInfo *)RL_CALLOC(skin.joints_count, sizeof(BoneInfo));
53765376

53775377
for (unsigned int i = 0; i < skin.joints_count; i++)

0 commit comments

Comments
 (0)