1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

(svn r12963) -Fix (r12960): loading some NewGRFs could cause an infinite loop.

This commit is contained in:
rubidium
2008-05-05 22:35:33 +00:00
parent 71800aa7c6
commit 50516f2372
2 changed files with 7 additions and 3 deletions

View File

@@ -595,7 +595,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
if (maptype == MAP_PACKET_NORMAL) {
// We are still receiving data, put it to the file
if (fwrite(p->buffer + p->pos, 1, p->size - p->pos, file_pointer) != p->size - p->pos) {
if (fwrite(p->buffer + p->pos, 1, p->size - p->pos, file_pointer) != (size_t)(p->size - p->pos)) {
_switch_mode_errorstr = STR_NETWORK_ERR_SAVEGAMEERROR;
return NETWORK_RECV_STATUS_SAVEGAME;
}