aboutsummaryrefslogtreecommitdiff
path: root/src/field.zig
diff options
context:
space:
mode:
authorJulien Dessaux2022-06-09 23:17:53 +0200
committerJulien Dessaux2022-06-09 23:18:27 +0200
commit75fc1506e59c1eaa52971d20df72c7cbeca5ac82 (patch)
tree09ac84d955f9fc1f7c8bc5a11415f765296de42b /src/field.zig
parentAdded submodules for the spec and the mycology test suite (diff)
downloadzigfunge98-75fc1506e59c1eaa52971d20df72c7cbeca5ac82.tar.gz
zigfunge98-75fc1506e59c1eaa52971d20df72c7cbeca5ac82.tar.bz2
zigfunge98-75fc1506e59c1eaa52971d20df72c7cbeca5ac82.zip
Pass the sanity test
Diffstat (limited to '')
-rw-r--r--src/field.zig2
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)] = ' ';