diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -137,7 +137,7 @@ void NetworkUDPSocketHandler::ReceivePac /* If the size does not match the packet must be corrupted. * Otherwise it will be marked as corrupted later on. */ - if (!p.ParsePacketSize() || nbytes != p.size) { + if (!p.ParsePacketSize() || (size_t)nbytes != p.Size()) { DEBUG(net, 1, "received a packet with mismatching size from %s", address.GetAddressAsString().c_str()); continue; }