From: Brendan Hansen Date: Tue, 8 Dec 2020 17:06:14 +0000 (-0600) Subject: updated code with bugfix in onyx X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=7d93941fcd95168fa34d5f0b058e3e48c16bd581;p=onyx-aoc-2020.git updated code with bugfix in onyx --- diff --git a/day8.onyx b/day8.onyx index e06eaa1..06f6a66 100644 --- a/day8.onyx +++ b/day8.onyx @@ -1,7 +1,6 @@ #include_file "core/std/wasi" use package core -use package system { output_string } OpCode :: enum (u16) { Nop; Acc; Jmp; @@ -46,11 +45,9 @@ get_acc_value :: proc (instrs: [..] Instruction, ret_acc: ^i32) -> bool { } main :: proc (args: [] cstring) { - // contents := file.get_contents("input/day8.txt"); - // contents_data := contents.data; - // defer cfree(contents_data); - - contents := #file_contents "input/day8.txt"; + contents := file.get_contents("input/day8.txt"); + contents_data := contents.data; + defer cfree(contents_data); instrs: [..] Instruction; array.init(^instrs, 32); diff --git a/out.wasm b/out.wasm index 8e2a8df..3c4a976 100644 Binary files a/out.wasm and b/out.wasm differ