summaryrefslogtreecommitdiff
path: root/src/network/network_client.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-19 20:24:41 +0000
committerrubidium <rubidium@openttd.org>2008-07-19 20:24:41 +0000
commit7c3fc1308771e4f8ea89328b0323a75239515366 (patch)
tree5ec4a18f962e8e9579fe41bc90f166ce67e59542 /src/network/network_client.cpp
parentc4467aa8fb3dd841a0b591491fe0bdd5ab3d49f7 (diff)
downloadopenttd-7c3fc1308771e4f8ea89328b0323a75239515366.tar.xz
(svn r13740) -Fix (r13731): one could only join the first company.
Diffstat (limited to 'src/network/network_client.cpp')
-rw-r--r--src/network/network_client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index cc8e746f5..2222c3182 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -367,7 +367,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_COMPANY_INFO)
if (total == 0) return NETWORK_RECV_STATUS_CLOSE_QUERY;
current = (Owner)p->Recv_uint8();
- if (!IsValidPlayerID(current)) return NETWORK_RECV_STATUS_CLOSE_QUERY;
+ if (current >= MAX_PLAYERS) return NETWORK_RECV_STATUS_CLOSE_QUERY;
p->Recv_string(_network_player_info[current].company_name, sizeof(_network_player_info[current].company_name));
_network_player_info[current].inaugurated_year = p->Recv_uint32();