summaryrefslogtreecommitdiff
path: root/scene/resources/packed_scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/packed_scene.cpp')
-rw-r--r--scene/resources/packed_scene.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 5ac7946391..ac528e6659 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1413,8 +1413,7 @@ NodePath SceneState::get_node_path(int p_idx,bool p_for_parent) const {
}
}
- for(int i=0;i<base_path.get_name_count();i++) {
- StringName sn = base_path.get_name(i);
+ for(int i=base_path.get_name_count()-1;i>=0;i--) {
sub_path.insert(0,base_path.get_name(i));
}