mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
process: SetupMainThread: Zero out argument on process start.
This commit is contained in:
parent
0f4f90cd04
commit
f2676efe23
|
@ -42,6 +42,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) {
|
||||||
|
|
||||||
// Register 1 must be a handle to the main thread
|
// Register 1 must be a handle to the main thread
|
||||||
const Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap();
|
const Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap();
|
||||||
|
thread->GetContext32().cpu_registers[0] = 0;
|
||||||
|
thread->GetContext64().cpu_registers[0] = 0;
|
||||||
thread->GetContext32().cpu_registers[1] = thread_handle;
|
thread->GetContext32().cpu_registers[1] = thread_handle;
|
||||||
thread->GetContext64().cpu_registers[1] = thread_handle;
|
thread->GetContext64().cpu_registers[1] = thread_handle;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue