From 50516f2372074c376fe89c6b7bb51b5105803a59 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 5 May 2008 22:35:33 +0000 Subject: (svn r12963) -Fix (r12960): loading some NewGRFs could cause an infinite loop. --- src/network/network_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network') diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 7a1492b11..65eb3e31b 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -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; } -- cgit v1.2.3-70-g09d2