mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 15:30:00 +00:00
(svn r21401) -Fix: ofcourse MSVC x64 has something to complain about...
This commit is contained in:
parent
ff8a01fbd2
commit
5f25cdbbd5
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user