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 | 664bbd304a2c18a169419fe7aac735b45e03a867 (patch) | |
tree | 63cd8c50ccb92f4195fb1a3748e901d2119d2a32 /src | |
parent | 39514a9d689f38ecff30593ce5128af4a219fcf0 (diff) | |
download | openttd-664bbd304a2c18a169419fe7aac735b45e03a867.tar.xz |
(svn r13739) -Fix (r13731): some variables would be erroneously zeroed, causing autoclean and company passwords not to work.
Diffstat (limited to 'src')
-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 |