From 8e424f3d1af2290fc23cf59aaf1c94f31873782c Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Thu, 21 Oct 2021 16:01:51 +0200 Subject: [PATCH] +fix: grepWinNP3 not intended switching "AllSize" settings --- grepWinNP3/src/SearchDlg.cpp | 2 +- grepWinNP3/src/SearchDlg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grepWinNP3/src/SearchDlg.cpp b/grepWinNP3/src/SearchDlg.cpp index b11d2bc8c..b71219839 100644 --- a/grepWinNP3/src/SearchDlg.cpp +++ b/grepWinNP3/src/SearchDlg.cpp @@ -361,7 +361,7 @@ LRESULT CSearchDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara } wchar_t buf[MAX_PATH] = {0}; - if (m_bSizeC && (m_lSize != static_cast(-1))) + if (m_bSizeC && (m_lSize != static_cast(0))) { swprintf_s(buf, _countof(buf), L"%I64u", m_lSize); SetDlgItemText(hwndDlg, IDC_SIZEEDIT, buf); diff --git a/grepWinNP3/src/SearchDlg.h b/grepWinNP3/src/SearchDlg.h index a07b22250..3b4c1a877 100644 --- a/grepWinNP3/src/SearchDlg.h +++ b/grepWinNP3/src/SearchDlg.h @@ -111,7 +111,7 @@ public: inline void SetWholeWords(bool bSet) { m_bWholeWordsC = true; m_bWholeWords = bSet; } inline void SetUTF8(bool bSet) { m_bUTF8C = true; m_bUTF8 = bSet; m_bForceBinary = false; } inline void SetBinary(bool bSet) { m_bUTF8C = true; m_bForceBinary = bSet; m_bUTF8 = false; } - inline void SetSize(uint64_t size, int cmp) { m_bSizeC = true; m_lSize = size; m_sizeCmp = cmp; m_bAllSize = (size == (uint64_t)-1); } + inline void SetSize(uint64_t size, int cmp) { m_bSizeC = true; m_lSize = size; m_sizeCmp = cmp; m_bAllSize = (size == (uint64_t)0); } inline void SetIncludeSystem(bool bSet) { m_bIncludeSystemC = true; m_bIncludeSystem = bSet; } inline void SetIncludeHidden(bool bSet) { m_bIncludeHiddenC = true; m_bIncludeHidden = bSet; } inline void SetIncludeSubfolders(bool bSet) { m_bIncludeSubfoldersC = true; m_bIncludeSubfolders = bSet; }