From c01289dddea2398fe7f4335f5d0babc4a9e789c5 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 9 Nov 2020 21:16:09 -0800 Subject: 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. --- apps/tile/value.mu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/tile/value.mu') 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 -- cgit 1.4.1-2-gfad0