Codechange: encapsulate reading the size of a Packet
This commit is contained in:
@@ -137,7 +137,7 @@ void NetworkUDPSocketHandler::ReceivePackets()
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user