- Fix a typo causing a potentially fatal bug in user-mode exceptions. Might fix hpous...
[reactos.git] / reactos / lib / ntdll / main / i386 / dispatch.S
index 289a435..ab51235 100644 (file)
@@ -9,7 +9,6 @@
 /* INCLUDES ******************************************************************/\r
 \r
 #include <ndk/asm.h>\r
-#include <ndk/i386/segment.h>\r
 .intel_syntax noprefix\r
 \r
 #define EXCEPTION_NONCONTINUABLE    1\r
@@ -117,7 +116,7 @@ _KiRaiseUserExceptionDispatcher@0:
     sub esp, SIZEOF_EXCEPTION_RECORD\r
 \r
     /* Fill out the record */\r
-    mov eax, [fs:TEB_SELECTOR]\r
+    mov eax, [fs:KPCR_TEB]\r
     mov eax, [eax+TEB_EXCEPTION_CODE]\r
     mov [esp+EXCEPTION_RECORD_EXCEPTION_CODE], eax\r
     mov dword ptr [esp+EXCEPTION_RECORD_EXCEPTION_FLAGS], 0\r