diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-11-09 21:16:09 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-11-09 21:16:09 -0800 |
commit | c01289dddea2398fe7f4335f5d0babc4a9e789c5 (patch) | |
tree | 26aa680c9633a19f1692140f00750aba615b7db5 /apps/tile/value.mu | |
parent | 148f2c9b65bcb53379d1c6bf7ec1204735bb2393 (diff) | |
download | mu-c01289dddea2398fe7f4335f5d0babc4a9e789c5.tar.gz |
7218
This bug was incredibly painful to track down: the one-line fix is to replace 'line' with 'first-line' in the call to 'evaluate' in render-line before recursing. Things that made it challenging: - A high degree of coiling with recursive calls and multiple places of evaluation. - An accidental aliasing in bindings (when rendering the main column in render-line) that masked the underlying bug and made things seem to work most of the time. - Too many fucking arguments to render-line, a maze of twisty line objects all alike.
Diffstat (limited to 'apps/tile/value.mu')
-rw-r--r-- | apps/tile/value.mu | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/tile/value.mu b/apps/tile/value.mu index 9e8c0050..cc046a04 100644 --- a/apps/tile/value.mu +++ b/apps/tile/value.mu @@ -5,6 +5,9 @@ fn render-value-at screen: (addr screen), row: int, col: int, _val: (addr value) move-cursor screen, row, col var val/esi: (addr value) <- copy _val var val-type/ecx: (addr int) <- get val, type +#? print-string-to-real-screen "value type: " +#? print-int32-decimal-to-real-screen *val-type +#? print-string-to-real-screen "\n" # per-type rendering logic goes here compare *val-type, 1 # string { @@ -54,7 +57,7 @@ fn render-value-at screen: (addr screen), row: int, col: int, _val: (addr value) print-string screen, " FILE " return } - compare *val-type, 4 # file + compare *val-type, 4 # screen { break-if-!= var val-ah/eax: (addr handle screen) <- get val, screen-data |