Commit 077da06e authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Bugfix: Bad jump generated in THUNK_AllocLSThunklet.

Bugfix: Forgot to convert segptr in AllocLSThunkletCallbackEx.
parent 3036c985
...@@ -1172,7 +1172,7 @@ FARPROC32 THUNK_AllocLSThunklet( SEGPTR target, DWORD relay, ...@@ -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, ...@@ -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;
......
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