Fixed operator

Fixed String::operator+=(const wchar_t). The problem was that a temporary variable don't have an address.
This commit is contained in:
TerraAr 2020-08-14 23:32:38 -03:00 committed by GitHub
parent a1ba843f36
commit 5e656923cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {