diff options
| author | karroffel | 2018-01-20 15:23:03 +0100 |
|---|---|---|
| committer | karroffel | 2018-01-20 15:26:58 +0100 |
| commit | 30822e8ab7735f3a715d4375292df5f0989ab788 (patch) | |
| tree | 609eb415aa1837e46d5af05325807ec80fff96b4 /core/string_builder.cpp | |
| parent | 09732a15a50cedc4d495588f77784c26d3b3c7a7 (diff) | |
| download | godot-30822e8ab7735f3a715d4375292df5f0989ab788.tar.gz godot-30822e8ab7735f3a715d4375292df5f0989ab788.tar.zst godot-30822e8ab7735f3a715d4375292df5f0989ab788.zip | |
Diffstat (limited to 'core/string_builder.cpp')
| -rw-r--r-- | core/string_builder.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/string_builder.cpp b/core/string_builder.cpp index 4d567cbc0..8ab7e0ea8 100644 --- a/core/string_builder.cpp +++ b/core/string_builder.cpp @@ -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; |
