summaryrefslogtreecommitdiffstats
path: root/src/core/String.cpp
diff options
context:
space:
mode:
authorTerraAr <37753757+TerraAr@users.noreply.github.com>2020-08-14 23:32:38 -0300
committerGitHub <noreply@github.com>2020-08-14 23:32:38 -0300
commit5e656923cfe9469a5f33104503e10ca076ce30b8 (patch)
treeeb7526f51bedda7617216d566c88d065fa8b2057 /src/core/String.cpp
parenta1ba843f3668ed53a25f5eb7866d882552028d53 (diff)
downloadredot-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.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 {