about summary refs log tree commit diff stats
path: root/apps/tile/data.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-11 00:11:04 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-11 00:11:04 -0700
commit1c441baf96ceb59ee1a04856f235b68244d59aae (patch)
tree24df84ad16f4417075647b4e1e497a92585db1c0 /apps/tile/data.mu
parent28d99f031dcee8c2b9753365fbae49bf0ac1f2a0 (diff)
downloadmu-1c441baf96ceb59ee1a04856f235b68244d59aae.tar.gz
7000 - tile: previous-word also bumps up to caller
Diffstat (limited to 'apps/tile/data.mu')
-rw-r--r--apps/tile/data.mu2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/tile/data.mu b/apps/tile/data.mu
index d864c640..adf9ac6a 100644
--- a/apps/tile/data.mu
+++ b/apps/tile/data.mu
@@ -429,6 +429,8 @@ fn decrement-final-element list: (addr handle call-path-element) {
   var final-ah/eax: (addr handle call-path-element) <- copy list
   var final/eax: (addr call-path-element) <- lookup *final-ah
   var val/eax: (addr int) <- get final, index-in-body
+  compare *val, 0
+  break-if-=
   decrement *val
 }