Skip to content
Snippets Groups Projects
Commit f2676efe authored by bunnei's avatar bunnei
Browse files

process: SetupMainThread: Zero out argument on process start.

parent 0f4f90cd
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) {
// Register 1 must be a handle to the main thread
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->GetContext64().cpu_registers[1] = thread_handle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment