yeah, backwards is backwards -.-
// true if this contains an ack for given (remote) seq
bool Acks(std::uint16_t) const noexcept;
std::uint16_t AckBegin() const noexcept { return ack; }
- std::uint16_t AckEnd() const noexcept { return ack + std::uint16_t(33); }
+ std::uint16_t AckEnd() const noexcept { return ack - std::uint16_t(33); }
};
struct Header {
}
}
// check for newly ack'd packets
- for (uint16_t s = ctrl_new.AckBegin(); s != ctrl_new.AckEnd(); ++s) {
+ for (uint16_t s = ctrl_new.AckBegin(); s != ctrl_new.AckEnd(); --s) {
if (ctrl_new.Acks(s) && !ctrl_in.Acks(s)) {
Handler().OnPacketReceived(s);
}