fixed bug where stack inspector shows incorrect addresses
This commit is contained in:
@@ -51,7 +51,6 @@ impl Component for StackInspector {
|
||||
ui.label("Address");
|
||||
ui.label("Value");
|
||||
ui.end_row();
|
||||
|
||||
for (i, value) in
|
||||
state.stack_view.chunks(4).take(32).enumerate()
|
||||
{
|
||||
@@ -59,9 +58,9 @@ impl Component for StackInspector {
|
||||
"Could not read 4 byte instruction or data! Something is wrong.",
|
||||
));
|
||||
ui.label(format!(
|
||||
"{} [{}]",
|
||||
i,
|
||||
state.reg_file.get(Register::Spr).expect("SPR should never be invalid") - i as u32 * 4
|
||||
"+{} [{}]",
|
||||
i*4,
|
||||
state.reg_file.get(Register::Spr).expect("SPR should never be invalid") + i as u32 * 4
|
||||
));
|
||||
ui.label(format!("0x{value:08X} ({value})"));
|
||||
ui.end_row();
|
||||
|
||||
Reference in New Issue
Block a user