mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Fixed the stack_sz used for stack_top in threadCreate(). t->stack_sz is uninitialized at the time stack_top is set, hence this was causing memory corruption in some cases.
This commit is contained in:
parent
cca73c47fa
commit
9703ddbf3e
@ -53,7 +53,7 @@ Result threadCreate(
|
||||
|
||||
if (R_SUCCEEDED(rc))
|
||||
{
|
||||
u64 stack_top = ((u64)stack_mirror) + t->stack_sz - sizeof(ThreadEntryArgs);
|
||||
u64 stack_top = ((u64)stack_mirror) + stack_sz - sizeof(ThreadEntryArgs);
|
||||
ThreadEntryArgs* args = (ThreadEntryArgs*) stack_top;
|
||||
Handle handle;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user