aboutsummaryrefslogtreecommitdiff
path: root/pkg/field/field.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-09-26 19:29:00 +0200
committerJulien Dessaux2021-09-27 07:51:07 +0200
commit0038f88327dacd8d1d973de0f09992852402881c (patch)
tree03c934314411190b35f54547f7ad0b6c7df10aba /pkg/field/field.go
parentRandomization and y fixes (diff)
downloadgofunge98-0038f88327dacd8d1d973de0f09992852402881c.tar.gz
gofunge98-0038f88327dacd8d1d973de0f09992852402881c.tar.bz2
gofunge98-0038f88327dacd8d1d973de0f09992852402881c.zip
Fixes some mycology test suite errors
Diffstat (limited to '')
-rw-r--r--pkg/field/field.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/field/field.go b/pkg/field/field.go
index fbe987a..a31f4da 100644
--- a/pkg/field/field.go
+++ b/pkg/field/field.go
@@ -41,8 +41,8 @@ func Load(fd io.Reader) (*Field, error) {
}
if l.l > 0 {
f.ly++
- if f.lx < l.l {
- f.lx = l.l
+ if f.lx-f.x < l.l-l.x {
+ f.lx = l.l - l.x + f.x
}
f.lines = append(f.lines, *l)
}