Merge pull request #15891 from karroffel/stringbuilder-fix-crash
fixed crash with StringBuilder
This commit is contained in:
commit
3cd5b1fec8
|
@ -56,6 +56,9 @@ StringBuilder &StringBuilder::append(const char *p_cstring) {
|
|||
|
||||
String StringBuilder::as_string() const {
|
||||
|
||||
if (string_length == 0)
|
||||
return "";
|
||||
|
||||
CharType *buffer = memnew_arr(CharType, string_length);
|
||||
|
||||
int current_position = 0;
|
||||
|
|
Loading…
Reference in New Issue