From 228d58655a7771ee9b47e68b4c94b0402df19958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Fri, 24 Mar 2023 17:56:37 +0100 Subject: [PATCH] :bug: Fixed missing check for position 0 --- src/simulator/register.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulator/register.rs b/src/simulator/register.rs index d352d74..4cbe50d 100644 --- a/src/simulator/register.rs +++ b/src/simulator/register.rs @@ -22,7 +22,7 @@ impl Register { /// Set value of register *position* to *value* pub fn set_reg(&mut self, position: usize, value: U) { - self.register[position] = value; + if position != 0 { self.register[position] = value; } }