Merge pull request #15891 from karroffel/stringbuilder-fix-crash

fixed crash with StringBuilder
This commit is contained in:
Thomas Herzog 2018-01-20 15:28:43 +01:00 committed by GitHub
commit 3cd5b1fec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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;