Fix some type conversion warnings

This commit is contained in:
Andreas Schmitt
2021-06-21 09:10:40 +02:00
parent f3b39b12a8
commit e1214a6d8b
7 changed files with 11 additions and 11 deletions

View File

@@ -474,7 +474,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendDesyncLog(const std::strin
for (size_t offset = 0; offset < log.size();) {
Packet *p = new Packet(PACKET_SERVER_DESYNC_LOG, SHRT_MAX);
size_t size = std::min<size_t>(log.size() - offset, SHRT_MAX - 2 - p->Size());
p->Send_uint16(size);
p->Send_uint16(static_cast<uint16>(size));
p->Send_binary(log.data() + offset, size);
this->SendPacket(p);