Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opcode_read: Parse buffer size check was wrong.
According to the [z-machine spec](https://inform-fiction.org/zmachine/standards/z1point1/sect15.html#sread) ... > (Interpreters are asked to halt with a suitable error message if the text > or parse buffers have length of less than 3 or 6 bytes, respectively: this > sometimes occurs due to a previous array being overrun, causing bugs which > are very difficult to find.) My check is incorrect here; I have no idea where I got 4 in any case from this text, but also, this number measures _tokens_, not bytes...the buffer size is actually `2 + 4 * parselen`, so anything larger than zero will be greater than 6 bytes. This fixes Moonmist exploding near the start, when it asks you to enter your name. Fixes #24.
- Loading branch information