about summary refs log tree commit diff stats
path: root/linux
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-15 20:35:43 -0700
committerKartik Agaram <vc@akkartik.com>2021-06-15 20:38:53 -0700
commitb28899fe3792f7cef535d49f0db5ab8a759b5db2 (patch)
treee1278878f17c7e8fd614b5b50d86bd8b9b428f15 /linux
parent03e6248c14216bd71af0f0db0e311713ca5fbf72 (diff)
downloadmu-b28899fe3792f7cef535d49f0db5ab8a759b5db2.tar.gz
.
Support newlines. Looks like we pasted the input from the browser window
during the pairing session.
Diffstat (limited to 'linux')
-rw-r--r--linux/advent2017/1a.mu4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/advent2017/1a.mu b/linux/advent2017/1a.mu
index 39bb1ff8..e2541441 100644
--- a/linux/advent2017/1a.mu
+++ b/linux/advent2017/1a.mu
@@ -15,7 +15,9 @@ fn main -> _/ebx: int {
     break-if-=
 
     var next_digit/eax: int <- read_digit input_stream_addr
-    var next_digit/eax: int <- copy next_digit
+    # hacky newline check
+    compare next_digit, 0
+    break-if-<
 
     {
       compare this_digit, next_digit