Merge pull request #90019 from fire/avoid-bone-map-infinite-loop

Fixed loop condition in bone mapping
This commit is contained in:
Rémi Verschelde 2024-04-04 14:36:47 +02:00
commit 4329ccb6e6
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1140,7 +1140,7 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
children.erase(ls_idx);
children.erase(rs_idx);
String word = "spine"; // It would be better to limit the search with "spine" because it could be mistaken with breast, wing and etc...
for (int i = 0; children.size(); i++) {
for (int i = 0; i < children.size(); i++) {
bone_idx = children[i];
if (is_match_with_bone_name(skeleton->get_bone_name(bone_idx), word)) {
neck = bone_idx;