Browse Source

Core: Fix invalid resize after appending

Stuart Carnie 2 months ago
parent
commit
4b3800582e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/string/ustring.cpp

+ 1 - 1
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;
 }