Skip to content

Commit

Permalink
Fix view address mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
onsdagens committed Aug 7, 2023
1 parent acf7a04 commit 62b80d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui_vizia/components/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl ViziaComponent for Mem {

data_slice.push(format!(
"0x{:08x}: {:02x}{:02x}{:02x}{:02x}",
idx * 4,
self.range.start as usize + idx * 4,
mem.0.borrow().get(&idx).copied().unwrap_or_else(|| 0u8),
mem.0
.borrow()
Expand Down Expand Up @@ -143,7 +143,8 @@ impl View for DataMemView {
);
} else {
// Why do we end up here, seems wrong
// panic!("Internal error, lookup should always succeed.")
println!("{}", idx);
panic!("Internal error, lookup should always succeed.")
}
}
})
Expand Down

0 comments on commit 62b80d8

Please sign in to comment.