summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-05 22:35:33 +0000
committerrubidium <rubidium@openttd.org>2008-05-05 22:35:33 +0000
commit50516f2372074c376fe89c6b7bb51b5105803a59 (patch)
tree7d7888c128635a5db3320701d111516be496f40a /src/network
parent71800aa7c67ede82fa391e9f462017c4a0a1bf9a (diff)
downloadopenttd-50516f2372074c376fe89c6b7bb51b5105803a59.tar.xz
(svn r12963) -Fix (r12960): loading some NewGRFs could cause an infinite loop.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_client.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}