From 5e656923cfe9469a5f33104503e10ca076ce30b8 Mon Sep 17 00:00:00 2001 From: TerraAr <37753757+TerraAr@users.noreply.github.com> Date: Fri, 14 Aug 2020 23:32:38 -0300 Subject: [PATCH] Fixed operator Fixed String::operator+=(const wchar_t). The problem was that a temporary variable don't have an address. --- src/core/String.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/String.cpp b/src/core/String.cpp index 65d210fe..35da37f8 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 {