diff options
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r-- | src/network/network_server.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 5b1da8fa2..9b9dc6fc9 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -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); } |