From d7343b901f3f262d15acfe2dddce62d9ce9821db Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sun, 18 Dec 2022 15:21:04 -0700 Subject: [PATCH] More guards --- src/memory.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/memory.rs b/src/memory.rs index 534364c..bb47e8d 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -56,8 +56,8 @@ impl Memory for TrivialMemory { Err(MemoryError::AddressOverflow) } else { let [high, low] = val.to_be_bytes(); - self.set1(address, high); - self.set1(address + 1, low); + self.set1(address, high)?; + self.set1(address + 1, low)?; Ok(()) } }