diff --git a/fmt.c b/fmt.c index 516102c..f18ec7b 100644 --- a/fmt.c +++ b/fmt.c @@ -52,7 +52,7 @@ void cpu_format_stack(struct cpu_t *cpu, char buffer[764]) { p = strcat(p, " "); } char tmp[8]; - sprintf(tmp, "%.2X", _mem_get_byte_direct(cpu, 0x0100 + sp)); + sprintf(tmp, "%.2X", _mem_get_byte_direct(cpu, 0x0100 + sp + 1)); p = strcat(p, tmp); } strcat(p, "]");