Skip to content

Commit

Permalink
Merge pull request #90019 from fire/avoid-bone-map-infinite-loop
Browse files Browse the repository at this point in the history
Fixed loop condition in bone mapping
  • Loading branch information
akien-mga committed Apr 4, 2024
2 parents 77a9cf0 + 15f1a0f commit 4329ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/plugins/bone_map_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4329ccb

Please sign in to comment.