diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 3b52ae567ac..0c728e61a7c 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -1946,7 +1946,7 @@ Error String::append_utf8(const char *p_utf8, int p_len, bool p_skip_cr) { } (*dst++) = 0; - resize_uninitialized(prev_length + dst - ptr()); + resize_uninitialized(dst - ptr()); return result; }