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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user