diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-02 09:15:12 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-14 23:22:04 +0200 |
commit | ebe32ad9129bb5846433366509728fb594f3be62 (patch) | |
tree | 3cd9b58a5da8531796762f33ca53fc6d79de9926 /src/network/network_admin.cpp | |
parent | 6db52d52d00516b71a982e61b3b9592a887091aa (diff) | |
download | openttd-ebe32ad9129bb5846433366509728fb594f3be62.tar.xz |
Codechange: [Network] Use std::string for the internal handling of admin/rcon passwords
Diffstat (limited to 'src/network/network_admin.cpp')
-rw-r--r-- | src/network/network_admin.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index 057ce32c0..dfe09344a 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -664,8 +664,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN(Packet *p) { if (this->status != ADMIN_STATUS_INACTIVE) return this->SendError(NETWORK_ERROR_NOT_EXPECTED); - char password[NETWORK_PASSWORD_LENGTH]; - p->Recv_string(password, sizeof(password)); + std::string password = p->Recv_string(NETWORK_PASSWORD_LENGTH); if (_settings_client.network.admin_password.empty() || _settings_client.network.admin_password.compare(password) != 0) { |