From 2e03c9c266ece3827aa5dadb6ba8f78ac912be5b Mon Sep 17 00:00:00 2001
From: Laurentino <81370009+lauchimoon@users.noreply.github.com>
Date: Mon, 6 Jul 2026 13:33:01 -0300
Subject: [PATCH 1/3] Change boneCount field type from int to unsigned int
(#5955)
---
src/raylib.h | 4 ++--
src/rmodels.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/raylib.h b/src/raylib.h
index 35f3c40a9..f0e67f535 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -409,7 +409,7 @@ typedef struct BoneInfo {
// Skeleton, animation bones hierarchy
typedef struct ModelSkeleton {
- int boneCount; // Number of bones
+ unsigned int boneCount; // Number of bones
BoneInfo *bones; // Bones information (skeleton)
ModelAnimPose bindPose; // Bones base transformation (Transform[])
} ModelSkeleton;
@@ -436,7 +436,7 @@ typedef struct Model {
typedef struct ModelAnimation {
char name[32]; // Animation name
- int boneCount; // Number of bones (per pose)
+ unsigned int boneCount; // Number of bones (per pose)
int keyframeCount; // Number of animation key frames
ModelAnimPose *keyframePoses; // Animation sequence keyframe poses [keyframe][pose]
} ModelAnimation;
diff --git a/src/rmodels.c b/src/rmodels.c
index 28fb3c9ec..08692028c 100644
--- a/src/rmodels.c
+++ b/src/rmodels.c
@@ -5369,9 +5369,9 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
}
// Load bone info from GLTF skin data
-static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, int *boneCount)
+static BoneInfo *LoadBoneInfoGLTF(cgltf_skin skin, unsigned int *boneCount)
{
- *boneCount = (int)skin.joints_count;
+ *boneCount = skin.joints_count;
BoneInfo *bones = (BoneInfo *)RL_CALLOC(skin.joints_count, sizeof(BoneInfo));
for (unsigned int i = 0; i < skin.joints_count; i++)
From 088177b269a8eb51d55cd80235d8836b277c97a1 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 6 Jul 2026 16:33:13 +0000
Subject: [PATCH 2/3] rlparser: update raylib_api.* by CI
---
tools/rlparser/output/raylib_api.json | 4 ++--
tools/rlparser/output/raylib_api.lua | 4 ++--
tools/rlparser/output/raylib_api.sexpr | 4 ++--
tools/rlparser/output/raylib_api.txt | 4 ++--
tools/rlparser/output/raylib_api.xml | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/rlparser/output/raylib_api.json b/tools/rlparser/output/raylib_api.json
index de1ebc884..2e6916737 100644
--- a/tools/rlparser/output/raylib_api.json
+++ b/tools/rlparser/output/raylib_api.json
@@ -968,7 +968,7 @@
"description": "Skeleton, animation bones hierarchy",
"fields": [
{
- "type": "int",
+ "type": "unsigned int",
"name": "boneCount",
"description": "Number of bones"
},
@@ -1045,7 +1045,7 @@
"description": "Animation name"
},
{
- "type": "int",
+ "type": "unsigned int",
"name": "boneCount",
"description": "Number of bones (per pose)"
},
diff --git a/tools/rlparser/output/raylib_api.lua b/tools/rlparser/output/raylib_api.lua
index 98308682d..574cfbf2d 100644
--- a/tools/rlparser/output/raylib_api.lua
+++ b/tools/rlparser/output/raylib_api.lua
@@ -968,7 +968,7 @@ return {
description = "Skeleton, animation bones hierarchy",
fields = {
{
- type = "int",
+ type = "unsigned int",
name = "boneCount",
description = "Number of bones"
},
@@ -1045,7 +1045,7 @@ return {
description = "Animation name"
},
{
- type = "int",
+ type = "unsigned int",
name = "boneCount",
description = "Number of bones (per pose)"
},
diff --git a/tools/rlparser/output/raylib_api.sexpr b/tools/rlparser/output/raylib_api.sexpr
index e4dee877c..e57c282a3 100644
--- a/tools/rlparser/output/raylib_api.sexpr
+++ b/tools/rlparser/output/raylib_api.sexpr
@@ -611,7 +611,7 @@
((name "ModelSkeleton")
(description "Skeleton, animation bones hierarchy")
(fields
- ((type "int")
+ ((type "unsigned int")
(name "boneCount")
(description "Number of bones"))
((type "BoneInfo *")
@@ -658,7 +658,7 @@
((type "char[32]")
(name "name")
(description "Animation name"))
- ((type "int")
+ ((type "unsigned int")
(name "boneCount")
(description "Number of bones (per pose)"))
((type "int")
diff --git a/tools/rlparser/output/raylib_api.txt b/tools/rlparser/output/raylib_api.txt
index 77a1dba1f..d0d60463c 100644
--- a/tools/rlparser/output/raylib_api.txt
+++ b/tools/rlparser/output/raylib_api.txt
@@ -448,7 +448,7 @@ Struct 20: BoneInfo (2 fields)
Struct 21: ModelSkeleton (3 fields)
Name: ModelSkeleton
Description: Skeleton, animation bones hierarchy
- Field[1]: int boneCount // Number of bones
+ Field[1]: unsigned int boneCount // Number of bones
Field[2]: BoneInfo * bones // Bones information (skeleton)
Field[3]: ModelAnimPose bindPose // Bones base transformation (Transform[])
Struct 22: Model (9 fields)
@@ -467,7 +467,7 @@ Struct 23: ModelAnimation (4 fields)
Name: ModelAnimation
Description: ModelAnimation, contains a full animation sequence
Field[1]: char[32] name // Animation name
- Field[2]: int boneCount // Number of bones (per pose)
+ Field[2]: unsigned int boneCount // Number of bones (per pose)
Field[3]: int keyframeCount // Number of animation key frames
Field[4]: ModelAnimPose * keyframePoses // Animation sequence keyframe poses [keyframe][pose]
Struct 24: Ray (2 fields)
diff --git a/tools/rlparser/output/raylib_api.xml b/tools/rlparser/output/raylib_api.xml
index b86c28b7a..77eb75c73 100644
--- a/tools/rlparser/output/raylib_api.xml
+++ b/tools/rlparser/output/raylib_api.xml
@@ -201,7 +201,7 @@
-
+
@@ -218,7 +218,7 @@
-
+
From 3d640698d83ee1f1bb32981c8018019b63330bca Mon Sep 17 00:00:00 2001
From: Timothy Fiss
Date: Mon, 6 Jul 2026 10:35:02 -0600
Subject: [PATCH 3/3] fix UB in ComputeSHA-1 (#5957)
---
src/rcore.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/rcore.c b/src/rcore.c
index d1163a515..0401817bf 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -3379,10 +3379,10 @@ unsigned int *ComputeSHA1(const unsigned char *data, int dataSize)
unsigned int w[80] = { 0 };
for (int i = 0; i < 16; i++)
{
- w[i] = (msg[offset + (i*4) + 0] << 24) |
- (msg[offset + (i*4) + 1] << 16) |
- (msg[offset + (i*4) + 2] << 8) |
- (msg[offset + (i*4) + 3]);
+ w[i] = ((unsigned int)msg[offset + (i*4) + 0] << 24) |
+ ((unsigned int)msg[offset + (i*4) + 1] << 16) |
+ ((unsigned int)msg[offset + (i*4) + 2] << 8) |
+ ((unsigned int)msg[offset + (i*4) + 3]);
}
// Message schedule: extend the sixteen 32-bit words into eighty 32-bit words: