From 02af86d3621afb557bea1e5e8503726a0d05375a Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 2 Jul 2022 19:55:18 +0200 Subject: [PATCH] Fix the logic of String::path_clean_end_slash(). --- core/ustring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ustring.cpp b/core/ustring.cpp index 5aba93ddf..6063083a5 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3571,7 +3571,7 @@ String String::path_clean_end_slash() const { String ret = *this; while (ret.length() > 1 && (ret.ends_with("/") || ret.ends_with("\\"))) { - ret.resize(length() - 1); + ret.resize(ret.length()); } return ret;