Skip to content

Commit

Permalink
use saturating sub in case outfox is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuczyn committed Oct 12, 2023
1 parent 3b634fe commit fe48701
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/client-libs/gateway-client/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ pub trait GatewayPacketRouter {
}

n if n
== PacketSize::OutfoxRegularPacket.plaintext_size() - outfox_ack_overhead =>
== PacketSize::OutfoxRegularPacket
.plaintext_size()
.saturating_sub(outfox_ack_overhead) =>
{
trace!("received regular outfox packet");
received_messages.push(received_packet);
Expand Down

0 comments on commit fe48701

Please sign in to comment.