diff options
| author | 2020-03-20 22:39:07 -0400 | |
|---|---|---|
| committer | 2020-04-17 00:11:50 -0400 | |
| commit | f2676efe23f03c1755715d049d53e26d1dac1864 (patch) | |
| tree | afeec2b9eb19e7d9d3a5bf8b6f9d70b3da0655cb /src/core/hle/kernel/process.cpp | |
| parent | arm_interface: Ensure ThreadContext is zero'd out. (diff) | |
| download | yuzu-f2676efe23f03c1755715d049d53e26d1dac1864.tar.gz yuzu-f2676efe23f03c1755715d049d53e26d1dac1864.tar.xz yuzu-f2676efe23f03c1755715d049d53e26d1dac1864.zip | |
process: SetupMainThread: Zero out argument on process start.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index edc414d69..ddbd75b8d 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -42,6 +42,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) { | |||
| 42 | 42 | ||
| 43 | // Register 1 must be a handle to the main thread | 43 | // Register 1 must be a handle to the main thread |
| 44 | const Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap(); | 44 | const Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap(); |
| 45 | thread->GetContext32().cpu_registers[0] = 0; | ||
| 46 | thread->GetContext64().cpu_registers[0] = 0; | ||
| 45 | thread->GetContext32().cpu_registers[1] = thread_handle; | 47 | thread->GetContext32().cpu_registers[1] = thread_handle; |
| 46 | thread->GetContext64().cpu_registers[1] = thread_handle; | 48 | thread->GetContext64().cpu_registers[1] = thread_handle; |
| 47 | 49 | ||