Skip to content

Commit

Permalink
tool: fix off-by-one error
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin authored and Ivan-Velickovic committed Jun 11, 2024
1 parent f8f1697 commit 9b4e73f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tool/microkit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl DisjointMemoryRegion {
pub fn insert_region(&mut self, base: u64, end: u64) {
let mut insert_idx = self.regions.len();
for (idx, region) in self.regions.iter().enumerate() {
if end < region.base {
if end <= region.base {
insert_idx = idx;
break;
}
Expand Down

1 comment on commit 9b4e73f

@wucke13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just stumbled upon this, good to see it fixed already :)

Please sign in to comment.