(svn r8361) -Codechange: make sure the range of the dates coming from the network are valid in OpenTTD

-Codechange: use_password is a boolean variable
-Codechange: move range checking for server_lang and map_set to Recv_NetworkGameInfo
This commit is contained in:
rubidium
2007-01-22 21:38:16 +00:00
parent 18d525c62c
commit daeadd9a0e
3 changed files with 9 additions and 7 deletions

View File

@@ -330,9 +330,6 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE)
}
}
if (item->info.server_lang >= NETWORK_NUM_LANGUAGES) item->info.server_lang = 0;
if (item->info.map_set >= NUM_LANDSCAPE ) item->info.map_set = 0;
if (item->info.hostname[0] == '\0')
snprintf(item->info.hostname, sizeof(item->info.hostname), "%s", inet_ntoa(client_addr->sin_addr));