Codechange: [Network] Use string_view for network compatability check

This commit is contained in:
rubidium42
2021-06-13 23:41:15 +02:00
committed by rubidium42
parent 49dcf0c772
commit a8b3afb236
3 changed files with 16 additions and 14 deletions

View File

@@ -878,7 +878,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *p)
uint32 newgrf_version = p->Recv_uint32();
/* Check if the client has revision control enabled */
if (!IsNetworkCompatibleVersion(client_revision.c_str()) || _openttd_newgrf_version != newgrf_version) {
if (!IsNetworkCompatibleVersion(client_revision) || _openttd_newgrf_version != newgrf_version) {
/* Different revisions!! */
return this->SendError(NETWORK_ERROR_WRONG_REVISION);
}