From 79f55dae1c0bce9261c4345e6a2bb41ba223f90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20St=C3=B6ckl?= Date: Tue, 22 Aug 2023 12:04:29 +0200 Subject: [PATCH] Fix wrong beacon index --- src/beacon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/beacon.rs b/src/beacon.rs index ed347d0..8f2fdec 100644 --- a/src/beacon.rs +++ b/src/beacon.rs @@ -112,7 +112,7 @@ fn packet(frames_count: u32, fragment_index: u16, checksum: u16, payload_length: &0x28u16.to_le_bytes(), &0xcu16.to_le_bytes(), &checksum.to_le_bytes(), - &(if fragment_index == (frames_count - 1) as u16 { 0xff } else { fragment_index }).to_le_bytes(), + &(if fragment_index == (frames_count - 1) as u16 { 0xffff } else { fragment_index }).to_le_bytes(), &payload_length.to_le_bytes(), &packet_payload ].concat()