mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 04:29:09 +00:00
(svn r12960) -Codechange: handle return values of (some) file system related functions.
This commit is contained in:
@@ -595,7 +595,10 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
|
||||
|
||||
if (maptype == MAP_PACKET_NORMAL) {
|
||||
// We are still receiving data, put it to the file
|
||||
fwrite(p->buffer + p->pos, 1, p->size - p->pos, file_pointer);
|
||||
if (fwrite(p->buffer + p->pos, 1, p->size - p->pos, file_pointer) != p->size - p->pos) {
|
||||
_switch_mode_errorstr = STR_NETWORK_ERR_SAVEGAMEERROR;
|
||||
return NETWORK_RECV_STATUS_SAVEGAME;
|
||||
}
|
||||
|
||||
_network_join_kbytes = ftell(file_pointer) / 1024;
|
||||
InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
|
||||
|
Reference in New Issue
Block a user