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 == ',')