summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/network/network_server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 986b56784..c3cf6ae3b 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1297,7 +1297,9 @@ void NetworkPopulateCompanyInfo()
uint i;
uint16 months_empty;
- memset(_network_player_info, 0, sizeof(_network_player_info));
+ for (PlayerID pid = PLAYER_FIRST; pid < MAX_PLAYERS; pid++) {
+ if (!IsValidPlayerID(pid)) memset(&_network_player_info[pid], 0, sizeof(NetworkPlayerInfo));
+ }
FOR_ALL_PLAYERS(p) {
// Clean the info but not the password