Author: mnordell
Date: Tue Sep 11 03:50:20 2012
New Revision: 57269
URL:
http://svn.reactos.org/svn/reactos?rev=57269&view=rev
Log:
Make SetUnhandledExceptionFilter return the _previous_ handler as it should. Fixes at
least a winetest for ntdll (MinGW startup code got stuck in infinite loop due to this
bug)
Modified:
trunk/reactos/dll/win32/kernel32/client/except.c
Modified: trunk/reactos/dll/win32/kernel32/client/except.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/except.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/except.c [iso-8859-1] Tue Sep 11 03:50:20
2012
@@ -435,12 +435,12 @@
WINAPI
SetUnhandledExceptionFilter(IN LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
{
- PVOID EncodedPointer, NewPointer;
+ PVOID EncodedPointer, EncodedOldPointer;
EncodedPointer = RtlEncodePointer(lpTopLevelExceptionFilter);
- NewPointer = InterlockedExchangePointer(&GlobalTopLevelExceptionFilter,
+ EncodedOldPointer = InterlockedExchangePointer(&GlobalTopLevelExceptionFilter,
EncodedPointer);
- return RtlDecodePointer(EncodedPointer);
+ return RtlDecodePointer(EncodedOldPointer);
}
/*