From 5e253b99ea45894d87eaca7cd6dc0476aa613f22 Mon Sep 17 00:00:00 2001 From: Anatoly Lyutin Date: Thu, 31 Jul 2008 14:05:58 +0400 Subject: [PATCH] Prevention endless loop. --- dlls/user32/dialog.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 444a73d..3a6ce34 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -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) )) { -- 1.5.4.5.GIT