diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-02 09:18:56 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-14 23:22:04 +0200 |
commit | 297d6e20bf0467d2a42e49bee291829ce3bb7c58 (patch) | |
tree | d428b9f170c31b1552b0365b21b916ff6ead6278 /src/console_cmds.cpp | |
parent | ebe32ad9129bb5846433366509728fb594f3be62 (diff) | |
download | openttd-297d6e20bf0467d2a42e49bee291829ce3bb7c58.tar.xz |
Codechange: [Network] Pass passwords as std::string to the network code
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 82638a5cb..a417831cb 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -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; |