diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-02 09:10:09 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-14 23:22:04 +0200 |
commit | 6db52d52d00516b71a982e61b3b9592a887091aa (patch) | |
tree | 0125b75c92e42e189ddce0cf347d51edad41706a /src/network/network_server.cpp | |
parent | 1de5cdeab8387b23b566142f205ac9232a6f61a3 (diff) | |
download | openttd-6db52d52d00516b71a982e61b3b9592a887091aa.tar.xz |
Codechange: [Network] Use std::string for the internal handling of server passwords
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r-- | src/network/network_server.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 4d35af116..314407348 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -953,8 +953,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GAME_PASSWORD(P 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); /* Check game password. Allow joining if we cleared the password meanwhile */ if (!_settings_client.network.server_password.empty() && |