Mercurial > hg > openttd
changeset 9663:927bd58346c1 draft
(svn r13739) -Fix (r13731): some variables would be erroneously zeroed, causing autoclean and company passwords not to work.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 19 Jul 2008 20:23:51 +0000 |
parents | cf5657f9e445 |
children | 5a0ec15f3364 |
files | src/network/network_server.cpp |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1297,7 +1297,9 @@ 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