diff options
author | eihrul <eihrul> | 2010-12-23 21:05:37 +0000 |
---|---|---|
committer | eihrul <eihrul> | 2010-12-23 21:05:37 +0000 |
commit | 7af1cd0de7668a5742cf9a057254b88a5006e601 (patch) | |
tree | c04ca6dbfaf239b9c9f583cd37a06f62859efd4f /peer.c | |
parent | 6ad4a745fbd5f9c8adfc82da6de22a27ee9038d8 (diff) | |
download | enet-7af1cd0de7668a5742cf9a057254b88a5006e601.tar.gz enet-7af1cd0de7668a5742cf9a057254b88a5006e601.zip |
fix fragment length when checksums are used
Diffstat (limited to 'peer.c')
-rw-r--r-- | peer.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) { |