From: guido Date: Tue, 17 Sep 2002 16:41:22 +0000 (+0000) Subject: fix calculation of InitSize and correctly set edx in the trap frame X-Git-Tag: ReactOS-0.0.21~179 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=11e344c9df96674e3d1b48068a62564e3087b98e fix calculation of InitSize and correctly set edx in the trap frame svn path=/trunk/; revision=3510 --- diff --git a/reactos/ntoskrnl/ke/i386/thread.c b/reactos/ntoskrnl/ke/i386/thread.c index 78ac3a4b284..e9bd65e7753 100644 --- a/reactos/ntoskrnl/ke/i386/thread.c +++ b/reactos/ntoskrnl/ke/i386/thread.c @@ -104,8 +104,8 @@ Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context) * Setup a stack frame for exit from the task switching routine */ - InitSize = 5 * sizeof(DWORD) + 6 * sizeof(DWORD) + - sizeof(FLOATING_SAVE_AREA) + sizeof(KTRAP_FRAME); + InitSize = 5 * sizeof(DWORD) + 6 * sizeof(DWORD) + sizeof(DWORD) + + sizeof(KTRAP_FRAME); KernelStack = (PULONG)(Thread->KernelStack - InitSize); /* Set up the initial frame for the return from the dispatcher. */ @@ -137,7 +137,7 @@ Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context) TrapFrame->Gs = Context->SegGs; TrapFrame->Es = Context->SegEs; TrapFrame->Ds = Context->SegDs; - TrapFrame->Edx = Context->Ebx; + TrapFrame->Edx = Context->Edx; TrapFrame->Ecx = Context->Ecx; TrapFrame->Eax = Context->Eax; TrapFrame->PreviousMode = UserMode;