From 6cf9af2817a9751bf3d677165bf8ceb85f4186f0 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Tue, 6 Aug 2024 12:43:35 +0800 Subject: Fix error when use relative #include in .gdshader / .gdshaderinc file --- core/string/ustring.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'core/string') 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; -- cgit v1.2.3