diff options
-rw-r--r-- | ui/win32/file_dlg_win32.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/win32/file_dlg_win32.cpp b/ui/win32/file_dlg_win32.cpp index 187ecf06e9..dc168a272a 100644 --- a/ui/win32/file_dlg_win32.cpp +++ b/ui/win32/file_dlg_win32.cpp @@ -887,7 +887,6 @@ filter_tb_get(HWND hwnd) { static void filter_tb_syntax_check(HWND hwnd, const TCHAR *filter_text) { std::wstring strval; - gint len; dfilter_t *dfp; /* If filter_text is non-NULL, use it. Otherwise, grab the text from @@ -895,7 +894,7 @@ filter_tb_syntax_check(HWND hwnd, const TCHAR *filter_text) { if (filter_text) { strval = filter_text; } else { - len = GetWindowTextLength(hwnd); + int len = GetWindowTextLength(hwnd); if (len > 0) { len++; strval.resize(len); @@ -904,7 +903,7 @@ filter_tb_syntax_check(HWND hwnd, const TCHAR *filter_text) { } } - if (len == 0) { + if (strval.empty()) { /* Default window background */ SendMessage(hwnd, EM_SETBKGNDCOLOR, (WPARAM) 1, COLOR_WINDOW); return; |