Skip to content

Commit 8de08c7

Browse files
committed
Merge pull request #107646 from stuartcarnie/string_append_utf8_bug
Core: Fix invalid resize after appending
2 parents 3d94ba0 + 4b38005 commit 8de08c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/string/ustring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ Error String::append_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
19181918
}
19191919

19201920
(*dst++) = 0;
1921-
resize_uninitialized(prev_length + dst - ptr());
1921+
resize_uninitialized(dst - ptr());
19221922

19231923
return result;
19241924
}

0 commit comments

Comments
 (0)