diff --git a/creature.go b/creature.go index 85cc0f6..d92c031 100644 --- a/creature.go +++ b/creature.go @@ -263,7 +263,7 @@ func (machine *Machine[WORD]) Peek(address WORD) (word WORD) { // Poke sets the value at address in the block to word. func (machine *Machine[WORD]) Poke(address WORD, word WORD) { if int(address) >= len(machine.block) { - reallocatedBlock := make([]WORD, address*3/2) + reallocatedBlock := make([]WORD, address*3/2+1) copy(reallocatedBlock, machine.block) machine.block = reallocatedBlock }