From e81061ad225a6b61a49988e92bc49941912ef0ec Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Wed, 1 Oct 2025 14:41:46 +0100 Subject: [PATCH] Check parent bones come before child bones --- model_format_glb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model_format_glb.c b/model_format_glb.c index fed6cb6..62a5bc7 100644 --- a/model_format_glb.c +++ b/model_format_glb.c @@ -460,8 +460,10 @@ static void read_joint_children( if (skin.joints[j] == i) break; } + assert(j < skin.joint_count); assert(bones[j].parent == UINT32_MAX); + assert(parent < j); bones[j].parent = parent; if (**p == ',')