Bugfix: Bad jump generated in THUNK_AllocLSThunklet.

Bugfix: Forgot to convert segptr in AllocLSThunkletCallbackEx.
This commit is contained in:
Ulrich Weigand 1998-11-24 20:43:59 +00:00 committed by Alexandre Julliard
parent 3036c985bd
commit 077da06e93
1 changed files with 2 additions and 2 deletions

View File

@ -1172,7 +1172,7 @@ FARPROC32 THUNK_AllocLSThunklet( SEGPTR target, DWORD relay,
thunk->target = (DWORD)target; thunk->target = (DWORD)target;
thunk->relay = (DWORD)relay; thunk->relay = (DWORD)relay;
thunk->glue = (DWORD)glue - (DWORD)&thunk->owner; thunk->glue = (DWORD)glue - (DWORD)&thunk->type;
thunk->type = THUNKLET_TYPE_LS; thunk->type = THUNKLET_TYPE_LS;
thunk->owner = pTask? pTask->hInstance : 0; thunk->owner = pTask? pTask->hInstance : 0;
@ -1266,7 +1266,7 @@ SEGPTR WINAPI AllocSLThunkletSysthunk( FARPROC32 target,
FARPROC32 WINAPI AllocLSThunkletCallbackEx( SEGPTR target, FARPROC32 WINAPI AllocLSThunkletCallbackEx( SEGPTR target,
DWORD relay, HTASK16 task ) DWORD relay, HTASK16 task )
{ {
THUNKLET *thunk = (THUNKLET *)target; THUNKLET *thunk = (THUNKLET *)PTR_SEG_TO_LIN( target );
if ( IsSLThunklet( thunk ) && thunk->relay == relay if ( IsSLThunklet( thunk ) && thunk->relay == relay
&& thunk->glue == (DWORD)ThunkletCallbackGlueSL ) && thunk->glue == (DWORD)ThunkletCallbackGlueSL )
return (FARPROC32)thunk->target; return (FARPROC32)thunk->target;