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
commite7d125de580a5f1a72272d2e806053efcbbb478d (patch)
tree7d7888c128635a5db3320701d111516be496f40a /src/network
parent19b20a7dde54acf3961eca797d5dce31b19fbdbc (diff)
downloadopenttd-e7d125de580a5f1a72272d2e806053efcbbb478d.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;
}