Skip to content

Commit

Permalink
Merge pull request tock#4343 from tock/dev/streaming-process-slice-of…
Browse files Browse the repository at this point in the history
…f-by-one

kernel/utilities/streaming_process_slice: fix off-by-one error
  • Loading branch information
lschuermann authored Feb 17, 2025
2 parents 38f1ac0 + d69e63e commit fa1795b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/src/utilities/streaming_process_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl<'a> StreamingProcessSlice<'a> {
const RANGE_VERSION: Range<usize> = 0..2;
const RANGE_FLAGS: Range<usize> = (Self::RANGE_VERSION.end)..(Self::RANGE_VERSION.end + 2);
const RANGE_OFFSET: Range<usize> = (Self::RANGE_FLAGS.end)..(Self::RANGE_FLAGS.end + 4);
const RANGE_DATA: RangeFrom<usize> = (Self::RANGE_OFFSET.end + 1)..;
const RANGE_DATA: RangeFrom<usize> = (Self::RANGE_OFFSET.end)..;

pub fn new(slice: &'a WriteableProcessSlice) -> StreamingProcessSlice<'a> {
StreamingProcessSlice { slice }
Expand Down

0 comments on commit fa1795b

Please sign in to comment.