ntdll: Clear the direction flag before calling exception handlers.
authorAlexandre Julliard <julliard@winehq.org>
Thu, 20 Mar 2008 10:50:07 +0000 (11:50 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 20 Mar 2008 13:27:35 +0000 (14:27 +0100)
dlls/ntdll/signal_i386.c

index 2cb59f53cc39939418ba821be6da88ba2992381a..bb8332ad7f079378863d25d28b1d014637672a09 100644 (file)
@@ -1083,8 +1083,8 @@ static EXCEPTION_RECORD *setup_exception( SIGCONTEXT *sigcontext, raise_func fun
     /* now modify the sigcontext to return to the raise function */
     ESP_sig(sigcontext) = (DWORD)stack;
     EIP_sig(sigcontext) = (DWORD)func;
-    /* clear single-step and align check flag */
-    EFL_sig(sigcontext) &= ~(0x100|0x40000); 
+    /* clear single-step, direction, and align check flag */
+    EFL_sig(sigcontext) &= ~(0x100|0x400|0x40000);
     CS_sig(sigcontext)  = wine_get_cs();
     DS_sig(sigcontext)  = wine_get_ds();
     ES_sig(sigcontext)  = wine_get_es();