mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
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)
svn path=/trunk/; revision=57269
This commit is contained in:
@@ -435,12 +435,12 @@ LPTOP_LEVEL_EXCEPTION_FILTER
|
||||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user