commit 61aa254c6d5d2c464997b46e5da922ca54c817eb parent ffcac37275a06110352a5c31a5db67724baacdfc Author: Walther Chen <walther.chen@gmail.com> Date: Thu, 10 Nov 2022 23:25:36 -0500 fix off-by-one in tracing Diffstat:
M | src/opt1.zig | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/opt1.zig b/src/opt1.zig @@ -53,7 +53,7 @@ fn interpret(program: Program, memory: []u8, rdr: anytype, wtr: anytype, alloc: if (entry.found_existing) { entry.value_ptr.* += 1; } else { - entry.value_ptr.* = 0; + entry.value_ptr.* = 1; } }