diff --git a/gir.js b/gir.js index 18c783d..7241402 100644 --- a/gir.js +++ b/gir.js @@ -976,8 +976,8 @@ function ircbotRun(program, input, maxCycles = 400000) { // even if there are no indices we can get values that // the rest of the code can work with let memoryIndices = Array.from(result.state.memory.keys()); - let min = memoryIndices.reduce(Math.min, tapeHead); - let max = memoryIndices.reduce(Math.max, tapeHead); + let min = memoryIndices.reduce((x,y) => Math.min(x, y), tapeHead); + let max = memoryIndices.reduce((x,y) => Math.max(x, y), tapeHead); // Get 15 cells of context on each side of tape head // Exception is if max or min comes up before that, in which