From 077da06e93f6968d93b726f3b38b1564f8fad35b Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 24 Nov 1998 20:43:59 +0000 Subject: [PATCH] Bugfix: Bad jump generated in THUNK_AllocLSThunklet. Bugfix: Forgot to convert segptr in AllocLSThunkletCallbackEx. --- if1632/thunk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/if1632/thunk.c b/if1632/thunk.c index 77e866a8cf6..cd04a0eb281 100644 --- a/if1632/thunk.c +++ b/if1632/thunk.c @@ -1172,7 +1172,7 @@ FARPROC32 THUNK_AllocLSThunklet( SEGPTR target, DWORD relay, thunk->target = (DWORD)target; thunk->relay = (DWORD)relay; - thunk->glue = (DWORD)glue - (DWORD)&thunk->owner; + thunk->glue = (DWORD)glue - (DWORD)&thunk->type; thunk->type = THUNKLET_TYPE_LS; thunk->owner = pTask? pTask->hInstance : 0; @@ -1266,7 +1266,7 @@ SEGPTR WINAPI AllocSLThunkletSysthunk( FARPROC32 target, FARPROC32 WINAPI AllocLSThunkletCallbackEx( SEGPTR target, DWORD relay, HTASK16 task ) { - THUNKLET *thunk = (THUNKLET *)target; + THUNKLET *thunk = (THUNKLET *)PTR_SEG_TO_LIN( target ); if ( IsSLThunklet( thunk ) && thunk->relay == relay && thunk->glue == (DWORD)ThunkletCallbackGlueSL ) return (FARPROC32)thunk->target;