From 63d7fb1464e6bdf9001ab46a8177631fe649d882 Mon Sep 17 00:00:00 2001 From: Denis-Cosmin NUTIU Date: Sat, 7 Dec 2024 21:58:26 +0200 Subject: [PATCH] fix set instruction --- src/emulator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emulator.rs b/src/emulator.rs index ebccee3..79cf223 100644 --- a/src/emulator.rs +++ b/src/emulator.rs @@ -234,7 +234,7 @@ where } ProcessorInstruction::Set(vx, vy) => { trace!("Set VX={vx:04x} VY={vy:04x}"); - self.registers[vx as usize] = vy; + self.registers[vx as usize] = self.registers[vy as usize]; } ProcessorInstruction::BinaryOr(vx, vy) => { trace!("BinaryOr VX={vx:04x} VY={vy:04x}");