Fix String::operator+ memory leak

pull/333/head
sheepandshepherd 2019-10-05 01:14:23 +02:00
parent 123d9f0e92
commit 9560cbff09
1 changed files with 2 additions and 2 deletions

View File

@ -124,8 +124,8 @@ bool String::operator!=(const String &s) const {
} }
String String::operator+(const String &s) const { String String::operator+(const String &s) const {
String new_string = *this; String new_string;
new_string._godot_string = godot::api->godot_string_operator_plus(&new_string._godot_string, &s._godot_string); new_string._godot_string = godot::api->godot_string_operator_plus(&_godot_string, &s._godot_string);
return new_string; return new_string;
} }