small bugfix
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-08-08 11:16:55 +02:00
parent a20955437e
commit fde3fe9cba
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -377,7 +377,8 @@ impl SpHeader {
expected: CCSDS_HEADER_LEN + 1, expected: CCSDS_HEADER_LEN + 1,
})); }));
} }
let zc_header = zc::SpHeader::from_bytes(buf).ok_or(PacketError::FromBytesZeroCopyError)?; let zc_header = zc::SpHeader::from_bytes(&buf[0..CCSDS_HEADER_LEN])
.ok_or(PacketError::FromBytesZeroCopyError)?;
Ok(Self::from(zc_header)) Ok(Self::from(zc_header))
} }
} }