diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2024-03-29 07:22:17 -0700 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2024-03-29 07:22:17 -0700 |
commit | 15f1a0fba3c8e576f83427b686ee49291d4e4eff (patch) | |
tree | 093887d09aa6d30121dd288662eacbd9a8b3175e /editor | |
parent | 0acfb38376f3b337e795be8f2b08d46105f62db9 (diff) | |
download | redot-engine-15f1a0fba3c8e576f83427b686ee49291d4e4eff.tar.gz |
Fixed loop condition in bone mapping
Corrected the for-loop condition in the auto_mapping_process function. Previously, it was checking if children.size() is non-zero, which resulted in an infinite loop
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/bone_map_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp index e80f299f42..848989d8e9 100644 --- a/editor/plugins/bone_map_editor_plugin.cpp +++ b/editor/plugins/bone_map_editor_plugin.cpp @@ -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; |