diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/network_client.cpp | 4 | ||||
-rw-r--r-- | src/network/network_server.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 281c2e928..a0a828a37 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -64,7 +64,7 @@ struct PacketReader : LoadFilter { assert(this->read_bytes == 0); size_t in_packet = p->size - p->pos; - size_t to_write = min(this->bufe - this->buf, in_packet); + size_t to_write = min((size_t)(this->bufe - this->buf), in_packet); const byte *pbuf = p->buffer + p->pos; this->written_bytes += in_packet; @@ -805,7 +805,7 @@ DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_MAP_DATA) /* We are still receiving data, put it to the file */ this->savegame->AddPacket(p); - _network_join_bytes = this->savegame->written_bytes; + _network_join_bytes = (uint32)this->savegame->written_bytes; SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0); return NETWORK_RECV_STATUS_OKAY; diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index de36ef9da..39da21632 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -113,7 +113,7 @@ struct PacketWriter : SaveFilter { while (buf != bufe) { size_t to_write = min(SEND_MTU - this->current->size, bufe - buf); memcpy(this->current->buffer + this->current->size, buf, to_write); - this->current->size += to_write; + this->current->size += (PacketSize)to_write; buf += to_write; if (this->current->size == SEND_MTU) { @@ -142,7 +142,7 @@ struct PacketWriter : SaveFilter { /* Fast-track the size to the client. */ Packet *p = new Packet(PACKET_SERVER_MAP_SIZE); - p->Send_uint32(this->total_size); + p->Send_uint32((uint32)this->total_size); this->cs->NetworkTCPSocketHandler::SendPacket(p); if (this->cs->savegame_mutex != NULL) this->cs->savegame_mutex->EndCritical(); |