소스 검색

Merge pull request #107646 from stuartcarnie/string_append_utf8_bug

Core: Fix invalid resize after appending
Thaddeus Crews 3 달 전
부모
커밋
8de08c7c21
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/string/ustring.cpp

+ 1 - 1
core/string/ustring.cpp

@@ -1918,7 +1918,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;
 }