Skip to content

Commit

Permalink
Handle errors in new_from_elf (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgoergens authored Oct 29, 2024
1 parent a74cbf3 commit 210a732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ceno_emul/src/vm_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl VMState {
}

pub fn new_from_elf(platform: Platform, elf: &[u8]) -> Result<Self> {
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() {
Expand Down

0 comments on commit 210a732

Please sign in to comment.