kernel32: Use FIELD_OFFSET instead of pointer cast.
This commit is contained in:
parent
e764e61369
commit
3eea9a6193
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue