Skip to content

Commit 3813558

Browse files
[15.4] Fix payload offset calculation
Prior payload offset calculation did not account for the 3 metadata bytes.
1 parent 8205794 commit 3813558

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libtock/net/ieee802154.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ int libtock_ieee802154_frame_get_length(const uint8_t* frame) {
436436

437437
int libtock_ieee802154_frame_get_payload_offset(const uint8_t* frame) {
438438
if (!frame) return 0;
439-
return frame[0];
439+
return frame[0] + libtock_ieee802154_FRAME_META_LEN;
440440
}
441441

442442
int libtock_ieee802154_frame_get_payload_length(const uint8_t* frame) {

0 commit comments

Comments
 (0)