From 7e70d3ac0425ebecab15c83d73786ec4b3438e37 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 29 Aug 2021 00:51:57 -0700 Subject: bugfix in commit 8e182e394 Any command in shell that rendered the screen resulted in an infinite loop. But it took me forever to even realize it was an infinite loop. --- 500fake-screen.mu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '500fake-screen.mu') diff --git a/500fake-screen.mu b/500fake-screen.mu index 1e5ea687..1e4f7b72 100644 --- a/500fake-screen.mu +++ b/500fake-screen.mu @@ -678,7 +678,7 @@ fn convert-graphemes-to-pixels _screen: (addr screen) { compare y, *height-a break-if->= var x/edi: int <- copy 0 - { + $convert-graphemes-to-pixels:loop-x: { compare x, *width-a break-if->= { @@ -696,7 +696,9 @@ fn convert-graphemes-to-pixels _screen: (addr screen) { var bg/eax: int <- screen-background-color-at screen, x, y var offset/eax: int <- draw-grapheme-on-screen-array data, g, x, y, fg, bg, *width-a, *height-a x <- add offset + loop $convert-graphemes-to-pixels:loop-x } + x <- increment loop } y <- increment -- cgit 1.4.1-2-gfad0