Use simple std::string assignment to plug memory leak

This commit is contained in:
Michał Janiszewski committed 2021-01-19 22:10:15 +01:00
1 parent 4ff5b9a89f
commit 4bcf68d84a
1 file changed
+1 -1
+1 -1
View File
@@ -398,7 +398,7 @@ namespace Config
playerName = String::Trim(playerName);
auto model = &gConfigNetwork;
model->player_name = String::Duplicate(playerName);
model->player_name = playerName;
model->default_port = reader->GetInt32("default_port", NETWORK_DEFAULT_PORT);
model->listen_address = reader->GetString("listen_address", "");
model->default_password = reader->GetString("default_password", "");