Skip to content

Commit 4b38005

Browse files
committed
Core: Fix invalid resize after appending
1 parent 46c495c commit 4b38005

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
@@ -1946,7 +1946,7 @@ Error String::append_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
19461946
}
19471947

19481948
(*dst++) = 0;
1949-
resize_uninitialized(prev_length + dst - ptr());
1949+
resize_uninitialized(dst - ptr());
19501950

19511951
return result;
19521952
}

0 commit comments

Comments
 (0)