From 75fc1506e59c1eaa52971d20df72c7cbeca5ac82 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 9 Jun 2022 23:17:53 +0200 Subject: Pass the sanity test --- src/field.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/field.zig') 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)] = ' '; -- cgit v1.2.3