src/network/network_client.cpp
changeset 10421 1daeaead8993
parent 10418 3ac4a89469df
child 10429 1b99254f9607
equal deleted inserted replaced
10420:3cbae348882c 10421:1daeaead8993
   593 		return NETWORK_RECV_STATUS_OKAY;
   593 		return NETWORK_RECV_STATUS_OKAY;
   594 	}
   594 	}
   595 
   595 
   596 	if (maptype == MAP_PACKET_NORMAL) {
   596 	if (maptype == MAP_PACKET_NORMAL) {
   597 		// We are still receiving data, put it to the file
   597 		// We are still receiving data, put it to the file
   598 		if (fwrite(p->buffer + p->pos, 1, p->size - p->pos, file_pointer) != p->size - p->pos) {
   598 		if (fwrite(p->buffer + p->pos, 1, p->size - p->pos, file_pointer) != (size_t)(p->size - p->pos)) {
   599 			_switch_mode_errorstr = STR_NETWORK_ERR_SAVEGAMEERROR;
   599 			_switch_mode_errorstr = STR_NETWORK_ERR_SAVEGAMEERROR;
   600 			return NETWORK_RECV_STATUS_SAVEGAME;
   600 			return NETWORK_RECV_STATUS_SAVEGAME;
   601 		}
   601 		}
   602 
   602 
   603 		_network_join_kbytes = ftell(file_pointer) / 1024;
   603 		_network_join_kbytes = ftell(file_pointer) / 1024;