about summary refs log tree commit diff stats
path: root/apps/tile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tile')
-rw-r--r--apps/tile/main.mu2
-rw-r--r--apps/tile/word.mu9
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/tile/main.mu b/apps/tile/main.mu
index 611289f9..57def626 100644
--- a/apps/tile/main.mu
+++ b/apps/tile/main.mu
@@ -77,6 +77,8 @@ fn test {
   initialize-environment-with-fake-screen env, 5, 0xa
   var g/eax: grapheme <- copy 0x61  # 'a'
   process env, g
+  g <- copy 0x20  # space
+  process env, g
   g <- copy 1  # 'ctrl-a'
   process env, g
   g <- copy 5  # 'ctrl-e'
diff --git a/apps/tile/word.mu b/apps/tile/word.mu
index 7d44475c..3d43a593 100644
--- a/apps/tile/word.mu
+++ b/apps/tile/word.mu
@@ -79,12 +79,15 @@ fn first-word _in: (addr handle word), out: (addr handle word) {
 }
 
 fn final-word _in: (addr handle word), out: (addr handle word) {
-  var curr-ah/esi: (addr handle word) <- copy _in
-  var curr/eax: (addr word) <- lookup *curr-ah
+  var curr-h: (handle word)
+  var curr-ah/esi: (addr handle word) <- address curr-h
+  copy-object _in, curr-ah
+  var curr/eax: (addr word) <- copy 0
   var next/edi: (addr handle word) <- copy 0
   {
+    curr <- lookup *curr-ah
     next <- get curr, next
-    var curr/eax: (addr word) <- lookup *next
+    curr <- lookup *next
     compare curr, 0
     break-if-=
     copy-object next, curr-ah