From 28953088077132c15dc9d1f254282bb62bd6f215 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 24 Sep 2021 18:16:30 +0200 Subject: Fixed line feed handling which should be treated as like newline in Unefunge-98, but it is unclear. --- pkg/field/field.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/field') diff --git a/pkg/field/field.go b/pkg/field/field.go index 42ade84..fbe987a 100644 --- a/pkg/field/field.go +++ b/pkg/field/field.go @@ -52,6 +52,9 @@ func Load(fd io.Reader) (*Field, error) { } } else { for i := 0; i < n; i++ { + if data[i] == ' ' { + continue + } if data[i] == '\n' || data[i] == '\r' { if f.ly == 0 && l.l == 0 { return nil, newDecodeError("No instruction on the first line of the file produces an unusable program in Befunge98") -- cgit v1.2.3