diff --git a/src/udpproto.rs b/src/udpproto.rs index 0b32478..52a2a64 100644 --- a/src/udpproto.rs +++ b/src/udpproto.rs @@ -63,7 +63,7 @@ impl UdpProto self.packet_offset += 7; - if self.packet_offset >= MAX_PACKET_LEN { + if self.packet_offset >= MAX_PACKET_LEN-7 { self.send_packet()?; }