From 21ce072e9da65ed0c81bd6e9d45560df467918e2 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 15 Jul 2024 13:41:02 -0700 Subject: [PATCH] Fixed stack debugger --- src/devices/system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/system.c b/src/devices/system.c index d8e421d..61adc50 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -45,8 +45,8 @@ static void system_print(Stack *s) { Uint8 i; - for(i = s->ptr - 7; i != (Uint8)(s->ptr + 1); i++) - fprintf(stderr, "%02x%c", s->dat[i], i == 0 ? '|' : ' '); + for(i = s->ptr - 7; i != (Uint8)(s->ptr); i++) + fprintf(stderr, "%02x%c", s->dat[i], i == 0xff ? '|' : ' '); fprintf(stderr, "< \n"); }