diff --git a/reactos/ntoskrnl/ke/i386/trap.s b/reactos/ntoskrnl/ke/i386/trap.s index ec95b4d6a3a..8d7a809c6c5 100644 --- a/reactos/ntoskrnl/ke/i386/trap.s +++ b/reactos/ntoskrnl/ke/i386/trap.s @@ -167,6 +167,9 @@ EXTERN _PsConvertToGuiThread@0:PROC PUBLIC _KiConvertToGuiThread@0 _KiConvertToGuiThread@0: + /* Safe ebx */ + push ebx + /* Calculate the stack frame offset in ebx */ mov ebx, ebp sub ebx, esp @@ -178,6 +181,9 @@ _KiConvertToGuiThread@0: mov ebp, esp add ebp, ebx + /* Restore ebx */ + pop ebx + /* return to the caller */ ret #endif