~jacksonchen666/brainfuck_interpreter

0cf25d679da45de87247a37c4f29267924cad74b — Jackson Chen 1 year, 1 month ago 0b017ba
workaround
1 files changed, 1 insertions(+), 0 deletions(-)

M brainfuck.go
M brainfuck.go => brainfuck.go +1 -0
@@ 112,6 112,7 @@ func (ps *ProgramState) Step() error {
			last := (*ps.loopStack)[len(*ps.loopStack)-1]
			*ps.loopStack = (*ps.loopStack)[:len(*ps.loopStack)-1]
			ps.codePointer = last
			ps.codePointer-- // workaround because below increment
		} else {
			// just ignore ] because [ won't continue on currentMemory == 0
		}