fix fragment length when checksums are used

This commit is contained in:
eihrul 2010-12-23 21:05:37 +00:00
parent 6ad4a745fb
commit 7af1cd0de7

2
peer.c
View file

@ -108,6 +108,8 @@ enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet)
return -1;
fragmentLength = peer -> mtu - sizeof (ENetProtocolHeader) - sizeof (ENetProtocolSendFragment);
if (peer -> host -> checksum != NULL)
fragmentLength -= sizeof(enet_uint32);
if (packet -> dataLength > fragmentLength)
{