When resetting the computer, deep clone the _initialMemory value to prevent passing by reference.
@@ -514,7 +514,7 @@ module.exports = class Computer {
* @returns {void}
*/
Reset() {
- this.stack = new Stack(this._initialMemory);
+ this.stack = new Stack(DeepClone(this._initialMemory));
this.outputValues = [];
this.options.inputModeMap = DeepClone(this.options._initialInputModeMap);
this.running = false;