diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 53f921785..9af939d0c 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -934,7 +934,7 @@ String String::substr_index(const int start_index, const int end_index) const { return ""; } - if (end_index >= s) { + if (end_index > s) { return substr(start_index, (s - 1) - start_index); }