diff options
author | truelight <truelight@openttd.org> | 2004-12-14 20:27:00 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-14 20:27:00 +0000 |
commit | b6c74c1c2077ce0c4dcd525890ea739a807f1508 (patch) | |
tree | 414a017a79ae9c8b05c4483bd6e6130f2b814562 /network_server.c | |
parent | 52aeaebde0f813375a5b08425fe522ffe1cc55c0 (diff) | |
download | openttd-b6c74c1c2077ce0c4dcd525890ea739a807f1508.tar.xz |
(svn r1090) -Fix: Made the _openttd_revision variable global, and with that
hopefully killed the windows-revision problem. If WITH_REV is defined,
for both Windows as *nix system _openttd_revision is filled with normal
info, else _openttd_revision is set to 'norev000'
-Fix: Small possible server-crash
Diffstat (limited to 'network_server.c')
-rw-r--r-- | network_server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/network_server.c b/network_server.c index 35abd9ae1..cc0b6b452 100644 --- a/network_server.c +++ b/network_server.c @@ -577,7 +577,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_JOIN) NetworkRecv_string(p, client_revision, sizeof(client_revision)); // Too bad, when WITH_REV is disabled, we can not compare the version. -#if defined(WITH_REV) || defined (WITH_REV_HACK) +#if defined(WITH_REV) // Check if the client has WITH_REV enabled if (strncmp("norev000", client_revision, sizeof(client_revision)) != 0) { if (strncmp(_network_game_info.server_revision, client_revision, sizeof(_network_game_info.server_revision) - 1) != 0) { @@ -1215,6 +1215,9 @@ void NetworkUpdateClientInfo(uint16 client_index) ci = NetworkFindClientInfoFromIndex(client_index); + if (ci == NULL) + return; + FOR_ALL_CLIENTS(cs) { SEND_COMMAND(PACKET_SERVER_CLIENT_INFO)(cs, ci); } |