diff --git a/udt/packet/pktseq.go b/udt/packet/pktseq.go index 7d1e334..03a1b9f 100644 --- a/udt/packet/pktseq.go +++ b/udt/packet/pktseq.go @@ -17,8 +17,7 @@ func (p *PacketID) Decr() { // Add returns a packet ID after adding the specified offset func (p PacketID) Add(off int32) PacketID { - newSeq := (p.Seq + 1) & 0x7FFFFFFF - return PacketID{newSeq} + return PacketID{uint32((int32(p.Seq) + off)) & 0x7FFFFFFF} } // BlindDiff attempts to return the difference after subtracting the argument from itself