From c4467aa8fb3dd841a0b591491fe0bdd5ab3d49f7 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 19 Jul 2008 20:23:51 +0000 Subject: (svn r13739) -Fix (r13731): some variables would be erroneously zeroed, causing autoclean and company passwords not to work. --- src/network/network_server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2