From 90c245cdbfe3d925b90aeeee6a4a85f815b1d5cc Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 2 Feb 1999 10:34:46 +0000 Subject: [PATCH] Bugfix: Preserve EAX in UnMapSLFixArray(). --- memory/selector.c | 5 ++++- relay32/kernel32.spec | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/memory/selector.c b/memory/selector.c index ac64ef2f5ed..2e2b6ff23cc 100644 --- a/memory/selector.c +++ b/memory/selector.c @@ -554,8 +554,11 @@ LPVOID WINAPI MapSLFix( SEGPTR sptr ) * UnMapSLFixArray (KERNEL32.701) */ -void WINAPI UnMapSLFixArray( SEGPTR sptr[], INT32 length ) +REGS_ENTRYPOINT(UnMapSLFixArray) /* SEGPTR sptr[], INT32 length */ { + /* Must not change EAX, hence defined as 'register' function */ + /* We need to remove the arguments ourselves */ + ESP_reg( context ) += 8; } /*********************************************************************** diff --git a/relay32/kernel32.spec b/relay32/kernel32.spec index c820e6ff372..9a2f5b6a229 100644 --- a/relay32/kernel32.spec +++ b/relay32/kernel32.spec @@ -717,7 +717,7 @@ init MAIN_KernelInit 698 stdcall UTRegister(long str str str ptr ptr ptr) UTRegister 699 stdcall UTUnRegister(long) UTUnRegister 700 stdcall UnMapLS(long) UnMapLS -701 stdcall UnMapSLFixArray(ptr long) UnMapSLFixArray +701 register UnMapSLFixArray() UnMapSLFixArray 702 stdcall UnhandledExceptionFilter(ptr) UnhandledExceptionFilter 703 stub UninitializeCriticalSection 704 stdcall UnlockFile(long long long long long) UnlockFile