Commit 3eea9a61 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Use FIELD_OFFSET instead of pointer cast.

parent e764e613
......@@ -694,7 +694,7 @@ static BOOL NE_InitDLL( NE_MODULE *pModule )
context.SegGs = wine_get_gs();
context.SegCs = SEL(pSegTable[SELECTOROF(pModule->ne_csip)-1].hSeg);
context.Eip = OFFSETOF(pModule->ne_csip);
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + (WORD)&((STACK16FRAME*)0)->bp;
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME,bp);
pModule->ne_csip = 0; /* Don't initialize it twice */
TRACE_(dll)("Calling LibMain for %.*s, cs:ip=%04x:%04x ds=%04x di=%04x cx=%04x\n",
......@@ -799,7 +799,7 @@ static void NE_CallDllEntryPoint( NE_MODULE *pModule, DWORD dwReason )
context.SegGs = wine_get_gs();
context.SegCs = HIWORD(entryPoint);
context.Eip = LOWORD(entryPoint);
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + (WORD)&((STACK16FRAME*)0)->bp;
context.Ebp = OFFSETOF(NtCurrentTeb()->WOW32Reserved) + FIELD_OFFSET(STACK16FRAME,bp);
args[7] = HIWORD(dwReason);
args[6] = LOWORD(dwReason);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment