Codechange: move passwords in settings to std::string

This commit is contained in:
rubidium42
2021-04-27 20:26:56 +02:00
committed by rubidium42
parent f219354f89
commit c73d64adf9
12 changed files with 42 additions and 34 deletions

View File

@@ -874,8 +874,8 @@ static void MakeNewGameDone()
/* We are the server, we start a new company (not dedicated),
* so set the default password *if* needed. */
if (_network_server && !StrEmpty(_settings_client.network.default_company_pass)) {
NetworkChangeCompanyPassword(_local_company, _settings_client.network.default_company_pass);
if (_network_server && !_settings_client.network.default_company_pass.empty()) {
NetworkChangeCompanyPassword(_local_company, _settings_client.network.default_company_pass.c_str());
}
if (_settings_client.gui.pause_on_newgame) DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);