summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/network_server.c b/network_server.c
index 0e37fc8ff..2108ee084 100644
--- a/network_server.c
+++ b/network_server.c
@@ -644,7 +644,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_JOIN)
if (_network_game_info.use_password)
SEND_COMMAND(PACKET_SERVER_NEED_PASSWORD)(cs, NETWORK_GAME_PASSWORD);
else {
- if (ci->client_playas <= MAX_PLAYERS && _network_player_info[ci->client_playas - 1].password[0] != '\0') {
+ if (ci->client_playas > 0 && ci->client_playas <= MAX_PLAYERS && _network_player_info[ci->client_playas - 1].password[0] != '\0') {
SEND_COMMAND(PACKET_SERVER_NEED_PASSWORD)(cs, NETWORK_COMPANY_PASSWORD);
}
else {