diff options
author | rubidium <rubidium@openttd.org> | 2008-07-19 20:23:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-19 20:23:51 +0000 |
commit | c4467aa8fb3dd841a0b591491fe0bdd5ab3d49f7 (patch) | |
tree | 63cd8c50ccb92f4195fb1a3748e901d2119d2a32 /src/network | |
parent | bfa66f70b3b074ec098431cd2084143a18348568 (diff) | |
download | openttd-c4467aa8fb3dd841a0b591491fe0bdd5ab3d49f7.tar.xz |
(svn r13739) -Fix (r13731): some variables would be erroneously zeroed, causing autoclean and company passwords not to work.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_server.cpp | 4 |
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 |