Fixed line feed handling which should be treated as like newline in Unefunge-98, but it is unclear.
This commit is contained in:
parent
b3f1792ffa
commit
2895308807
2 changed files with 3 additions and 3 deletions
|
@ -52,6 +52,9 @@ func Load(fd io.Reader) (*Field, error) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for i := 0; i < n; i++ {
|
for i := 0; i < n; i++ {
|
||||||
|
if data[i] == '' {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if data[i] == '\n' || data[i] == '\r' {
|
if data[i] == '\n' || data[i] == '\r' {
|
||||||
if f.ly == 0 && l.l == 0 {
|
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")
|
return nil, newDecodeError("No instruction on the first line of the file produces an unusable program in Befunge98")
|
||||||
|
|
|
@ -296,9 +296,6 @@ func (p *Pointer) eval(c int, f *field.Field) (done bool, returnValue *int) {
|
||||||
log.Fatalf("Non implemented instruction code %d : %c", c, c)
|
log.Fatalf("Non implemented instruction code %d : %c", c, c)
|
||||||
case 't':
|
case 't':
|
||||||
log.Fatalf("Non implemented instruction code %d : %c", c, c)
|
log.Fatalf("Non implemented instruction code %d : %c", c, c)
|
||||||
case 12:
|
|
||||||
// Trifunge function that resets in befunge
|
|
||||||
p.x, p.y = 0, 0
|
|
||||||
default:
|
default:
|
||||||
handled = false
|
handled = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue