about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-29 00:51:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-29 00:51:57 -0700
commit7e70d3ac0425ebecab15c83d73786ec4b3438e37 (patch)
treec7151e855f9dd7fcfb5e279b04456080fb477b58
parentbd34858c4e713c12ab1f907087a2fea97703385f (diff)
downloadmu-7e70d3ac0425ebecab15c83d73786ec4b3438e37.tar.gz
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.
-rw-r--r--500fake-screen.mu4
1 files changed, 3 insertions, 1 deletions
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