Fixed incorrect flow control

This commit is contained in:
François Autin 2023-04-05 13:44:43 +02:00
parent 3685bb6590
commit b96808b55f
No known key found for this signature in database
GPG Key ID: 343F5D382E1DD77C

View File

@ -67,9 +67,9 @@ fn syscall(machine: &mut Machine, system: &mut System) -> Result<MachineOk, Mach
SC_EXIT => {
let th = match &system.get_thread_manager().g_current_thread {
Some(th) => th,
None => Err("Current thread is None".into())
}?;
system.get_thread_manager().thread_finish(machine, th);
None => Err("Current thread is None")?
};
system.get_thread_manager().thread_finish(machine, *th);
Ok(MachineOk::Ok)
},
SC_EXEC => todo!(),