Cleanup: [Network] Remove C-string Recv_string and its last use
This commit is contained in:
@@ -874,13 +874,11 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *p)
|
||||
return this->SendError(NETWORK_ERROR_NOT_EXPECTED);
|
||||
}
|
||||
|
||||
char client_revision[NETWORK_REVISION_LENGTH];
|
||||
|
||||
p->Recv_string(client_revision, sizeof(client_revision));
|
||||
std::string client_revision = p->Recv_string(NETWORK_REVISION_LENGTH);
|
||||
uint32 newgrf_version = p->Recv_uint32();
|
||||
|
||||
/* Check if the client has revision control enabled */
|
||||
if (!IsNetworkCompatibleVersion(client_revision) || _openttd_newgrf_version != newgrf_version) {
|
||||
if (!IsNetworkCompatibleVersion(client_revision.c_str()) || _openttd_newgrf_version != newgrf_version) {
|
||||
/* Different revisions!! */
|
||||
return this->SendError(NETWORK_ERROR_WRONG_REVISION);
|
||||
}
|
||||
|
Reference in New Issue
Block a user