summaryrefslogtreecommitdiff
path: root/core/string
diff options
context:
space:
mode:
Diffstat (limited to 'core/string')
-rw-r--r--core/string/ustring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 2ba389fc4d..d0d7b613ef 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -2839,7 +2839,7 @@ String String::substr(int p_from, int p_chars) const {
return String(*this);
}
- String s = String();
+ String s;
s.copy_from_unchecked(&get_data()[p_from], p_chars);
return s;
}