From 67e2c6145c8650defb5af6ff88d805dc07fe3975 Mon Sep 17 00:00:00 2001 From: DhruvMaroo Date: Mon, 31 May 2021 09:31:11 +0530 Subject: [PATCH] used godot_string_new_copy to copy --- src/core/String.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/String.cpp b/src/core/String.cpp index 68ead4df..ac72f061 100644 --- a/src/core/String.cpp +++ b/src/core/String.cpp @@ -74,7 +74,7 @@ String::String(const String &other) { } String::String(String&& other) { - _godot_string = other._godot_string; + godot::api->godot_string_new_copy(&_godot_string, &other._godot_string); } String::~String() { @@ -100,7 +100,7 @@ void String::operator=(const String &s) { void String::operator=(String&& s) { godot::api->godot_string_destroy(&_godot_string); - _godot_string = s._godot_string; + godot::api->godot_string_new_copy(&_godot_string, &s._godot_string); } bool String::operator==(const String &s) const {