diff options
author | Julien Dessaux | 2022-06-09 23:17:53 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-06-09 23:18:27 +0200 |
commit | 75fc1506e59c1eaa52971d20df72c7cbeca5ac82 (patch) | |
tree | 09ac84d955f9fc1f7c8bc5a11415f765296de42b /src/field.zig | |
parent | Added submodules for the spec and the mycology test suite (diff) | |
download | zigfunge98-75fc1506e59c1eaa52971d20df72c7cbeca5ac82.tar.gz zigfunge98-75fc1506e59c1eaa52971d20df72c7cbeca5ac82.tar.bz2 zigfunge98-75fc1506e59c1eaa52971d20df72c7cbeca5ac82.zip |
Pass the sanity test
Diffstat (limited to '')
-rw-r--r-- | src/field.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/field.zig b/src/field.zig index c0a0b52..1e9b56f 100644 --- a/src/field.zig +++ b/src/field.zig @@ -6,7 +6,7 @@ const Line = struct { data: std.ArrayList(i64), fn blank(l: *Line, x: i64) void { const lx = @intCast(i64, l.len()); - if (x < l.x or x > l.x + lx) { // outside the field + if (x < l.x or x > l.x + lx - 1) { // outside the field return; } else if (x > l.x and x < l.x + lx - 1) { // just set the value l.data.items[@intCast(usize, x - l.x)] = ' '; |