🐛 Fixed missing check for position 0

This commit is contained in:
François Autin 2023-03-24 17:56:37 +01:00
parent 03cc8e17c6
commit 228d58655a
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C

View File

@ -22,7 +22,7 @@ impl<U: RegisterNum> Register<U> {
/// 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; }
}