diff options
| author | TerraAr <37753757+TerraAr@users.noreply.github.com> | 2020-08-14 23:32:38 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-14 23:32:38 -0300 |
| commit | 5e656923cfe9469a5f33104503e10ca076ce30b8 (patch) | |
| tree | eb7526f51bedda7617216d566c88d065fa8b2057 /src/core/String.cpp | |
| parent | a1ba843f3668ed53a25f5eb7866d882552028d53 (diff) | |
| download | redot-cpp-5e656923cfe9469a5f33104503e10ca076ce30b8.tar.gz | |
Fixed operator
Fixed String::operator+=(const wchar_t). The problem was that a temporary variable don't have an address.
Diffstat (limited to 'src/core/String.cpp')
| -rw-r--r-- | src/core/String.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/String.cpp b/src/core/String.cpp index 65d210f..35da37f 100644 --- a/src/core/String.cpp +++ b/src/core/String.cpp @@ -135,7 +135,8 @@ void String::operator+=(const String &s) { } void String::operator+=(const wchar_t c) { - _godot_string = godot::api->godot_string_operator_plus(&_godot_string, &(String(c)._godot_string)); + String _to_be_added = c; + _godot_string = godot::api->godot_string_operator_plus(&_godot_string, &_to_be_added._godot_string); } bool String::operator<(const String &s) const { |
