summaryrefslogtreecommitdiffstats
path: root/src/core/String.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/String.cpp')
-rw-r--r--src/core/String.cpp3
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 {