small bugfix, test works
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2023-09-26 12:48:25 +02:00
parent 683ae899f5
commit a62df6dbf8
2 changed files with 56 additions and 15 deletions

View File

@ -80,7 +80,7 @@ pub fn parse_buffer_for_ccsds_space_packets<E>(
let length_field =
u16::from_be_bytes(buf[current_idx + 4..current_idx + 6].try_into().unwrap());
let packet_size = length_field + 7;
if (current_idx + packet_size as usize) < buf_len {
if (current_idx + packet_size as usize) <= buf_len {
tc_receiver.pass_tc(&buf[current_idx..current_idx + packet_size as usize])?;
packets_found += 1;
} else {