Suppen / fishlanguage

The new and very much improved fishlanguage.com
MIT License
9 stars 4 forks source link

Crashes when attempting to Get from empty cell #1

Closed geajack closed 6 years ago

geajack commented 6 years ago

The instruction g in Fish retrieves the character at a given position in the source code. The instruction causes the interpreter to crash under certain conditions.

Condition 1: Example code: 30g If you try to access a character outside of the source code area. According to the language spec, this should actually return a zero value. According to the spec, the codebox is "infinite in all directions", so even negative coordinates should be valid.

Condition 2: Example code: "A"f0pf1-0g Using the instruction p, we can insert characters into the source code. When we insert a character far away from the existing source code, the gap in between is filled with spaces. Trying to access one of these spaces with g crashes the interpreter.

Suppen commented 6 years ago

Related, and an issue mainly with fish-interpreter, not this repo. I'll "move" this issue over there

Suppen commented 6 years ago

Fixed as of commit d9033deff0fa6e956c911c6cb97a3ea537085a4d