Update main to return the given status instead of printing the status out when halted
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -36,7 +36,7 @@ fn main() -> Result<()> {
|
||||
println!("{}", err.pp(&lexer, &parser::token_epp));
|
||||
}
|
||||
if !errors.is_empty() {
|
||||
return Ok(());
|
||||
process::exit(1);
|
||||
}
|
||||
let res = res.unwrap();
|
||||
let mut asm = Asm::default();
|
||||
@@ -44,6 +44,6 @@ fn main() -> Result<()> {
|
||||
let mut state = State::new();
|
||||
state.load_object(object, 64 * 1024 * 1024)?;
|
||||
let status = state.exec()?;
|
||||
println!("exit status: {:#04x}", status);
|
||||
Ok(())
|
||||
//println!("exit status: {:#04x}", status);
|
||||
process::exit((status & 0xffff_ffff) as i32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user