summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
authorjsjtxietian <jsjtxietian@outlook.com>2024-08-06 12:43:35 +0800
committerjsjtxietian <jsjtxietian@outlook.com>2024-08-08 11:59:14 +0800
commit6cf9af2817a9751bf3d677165bf8ceb85f4186f0 (patch)
tree61dfd588d1eede2ec5f09b91c556926c8e5ff9e5 /core/string
parent3978628c6cc1227250fc6ed45c8d854d24c30c30 (diff)
downloadredot-engine-6cf9af2817a9751bf3d677165bf8ceb85f4186f0.tar.gz
Fix error when use relative #include in .gdshader / .gdshaderinc file
Diffstat (limited to 'core/string')
-rw-r--r--core/string/ustring.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 3d37e17ef8..2edc5454f7 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -4384,10 +4384,7 @@ String String::simplify_path() const {
dirs.remove_at(i);
i--;
} else if (d == "..") {
- if (i == 0) {
- dirs.remove_at(i);
- i--;
- } else {
+ if (i != 0) {
dirs.remove_at(i);
dirs.remove_at(i - 1);
i -= 2;