Codechange: [Network] Pass passwords as std::string to the network code

This commit is contained in:
rubidium42
2021-05-02 09:18:56 +02:00
committed by rubidium42
parent ebe32ad912
commit 297d6e20bf
6 changed files with 24 additions and 28 deletions

View File

@@ -1737,7 +1737,7 @@ DEF_CONSOLE_CMD(ConCompanyPassword)
}
CompanyID company_id;
const char *password;
std::string password;
const char *errormsg;
if (argc == 2) {
@@ -1759,10 +1759,10 @@ DEF_CONSOLE_CMD(ConCompanyPassword)
password = NetworkChangeCompanyPassword(company_id, password);
if (StrEmpty(password)) {
if (password.empty()) {
IConsolePrintF(CC_WARNING, "Company password cleared");
} else {
IConsolePrintF(CC_WARNING, "Company password changed to: %s", password);
IConsolePrintF(CC_WARNING, "Company password changed to: %s", password.c_str());
}
return true;