~jacksonchen666/brainfuck_interpreter

8101a1f191f99dccec8bb7d0221274961612a9fc — Jackson Chen 1 year, 1 month ago 1ba581f main
add expandAsNecessary to end
1 files changed, 1 insertions(+), 0 deletions(-)

M brainfuck.go
M brainfuck.go => brainfuck.go +1 -0
@@ 117,6 117,7 @@ func (ps *ProgramState) Step() error {
			// just ignore ] because [ won't continue on currentMemory == 0
		}
	}
	ps.expandAsNecessary()
	(*ps.tape)[ps.memoryPointer] = currentMemory
	ps.codePointer++
	return nil