Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rs-matter/src/transport/dedup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl RxCtrState {
/// The method will return `false` if the message is detected to be duplicate, and therefore,
/// the RX state had not been updated.
pub fn post_recv(&mut self, msg_ctr: u32, is_encrypted: bool) -> bool {
let idiff = (msg_ctr as i32) - (self.max_ctr as i32);
let idiff = msg_ctr.wrapping_sub(self.max_ctr) as i32;
let udiff = idiff.unsigned_abs();

Comment thread
ivmarkov marked this conversation as resolved.
if msg_ctr == self.max_ctr {
Expand Down
Loading