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"); }