From 210a73201071398f2ca65ea61bbd0bd8180f6bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20G=C3=B6rgens?= Date: Tue, 29 Oct 2024 18:07:42 +0800 Subject: [PATCH] Handle errors in `new_from_elf` (#491) --- ceno_emul/src/vm_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceno_emul/src/vm_state.rs b/ceno_emul/src/vm_state.rs index 03a1f7926..bff16fe09 100644 --- a/ceno_emul/src/vm_state.rs +++ b/ceno_emul/src/vm_state.rs @@ -48,7 +48,7 @@ impl VMState { } pub fn new_from_elf(platform: Platform, elf: &[u8]) -> Result { - let program = Program::load_elf(elf, u32::MAX).unwrap(); + let program = Program::load_elf(elf, u32::MAX)?; let state = Self::new(platform, program); if state.program.base_address != state.platform.rom_start() {