Codechange: [Network] Use std::string for the internal handling of server passwords

This commit is contained in:
rubidium42
2021-05-02 09:10:09 +02:00
committed by rubidium42
parent 1de5cdeab8
commit 6db52d52d0
3 changed files with 7 additions and 9 deletions

View File

@@ -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() &&