Fixed line feed handling which should be treated as like newline in Unefunge-98, but it is unclear.

This commit is contained in:
Julien Dessaux 2021-09-24 18:16:30 +02:00
parent b3f1792ffa
commit 2895308807
2 changed files with 3 additions and 3 deletions

View file

@ -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")