Use simple std::string assignment to plug memory leak

This commit is contained in:
Michał Janiszewski 2021-01-19 22:10:15 +01:00
parent 4ff5b9a89f
commit 4bcf68d84a
1 changed files with 1 additions and 1 deletions

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", "");