Fixed stack debugger

This commit is contained in:
Devine Lu Linvega 2024-07-15 13:41:02 -07:00
parent 215dc9db52
commit 21ce072e9d
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ static void
system_print(Stack *s) system_print(Stack *s)
{ {
Uint8 i; Uint8 i;
for(i = s->ptr - 7; i != (Uint8)(s->ptr + 1); i++) for(i = s->ptr - 7; i != (Uint8)(s->ptr); i++)
fprintf(stderr, "%02x%c", s->dat[i], i == 0 ? '|' : ' '); fprintf(stderr, "%02x%c", s->dat[i], i == 0xff ? '|' : ' ');
fprintf(stderr, "< \n"); fprintf(stderr, "< \n");
} }