user32: Prevent endless loop
authorAnatoly Lyutin <vostok@etersoft.ru>
Tue, 29 Apr 2008 11:52:01 +0000 (15:52 +0400)
committerKonstantin Kondratyuk <kondratyuk@etersoft.ru>
Fri, 2 May 2008 09:34:05 +0000 (13:34 +0400)
dlls/user32/dialog.c

index a9867c644feb84f4c568ade0c483e3a0207e4f33..4d6a7fa4a9ba24135a680f6b814541e7ed0f8735 100644 (file)
@@ -918,6 +918,9 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM wParam )
         if ((style & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE)
         {
             dlgCode = SendMessageW( hwndControl, WM_GETDLGCODE, 0, 0 );
+            if (dlgCode & DLGC_WANTCHARS)
+                break; /* prevent endless loop */
+
             if ( (dlgCode & (DLGC_BUTTON | DLGC_STATIC)) &&
                  GetWindowTextW( hwndControl, buffer, sizeof(buffer)/sizeof(WCHAR) ))
             {