From 3455e12703f4e230df3f3d630af8308f84cb8e7c Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Sat, 3 Apr 2021 11:32:31 +0200 Subject: [PATCH] + fix: grepWinNP3: fix missing search flags --- grepWinNP3/src/SearchDlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grepWinNP3/src/SearchDlg.cpp b/grepWinNP3/src/SearchDlg.cpp index f983becb6..95c916ad8 100644 --- a/grepWinNP3/src/SearchDlg.cpp +++ b/grepWinNP3/src/SearchDlg.cpp @@ -3810,7 +3810,7 @@ int CSearchDlg::SearchFile(std::shared_ptr sinfoPtr, const std::wst // in any case, use the search function that uses a file iterator // instead of a string iterator to reduce the memory consumption - if ((type != CTextFile::Binary) || (searchFlags.bIncludeBinary) || searchFlags.bSearchAlways /* @@@|| m_bForceBinary */) + if ((type != CTextFile::Binary) || searchFlags.bIncludeBinary || searchFlags.bSearchAlways || searchFlags.bForceBinary) { sinfoPtr->encoding = type; std::string filePath = CUnicodeUtils::StdGetANSI(sinfoPtr->filePath); @@ -3856,7 +3856,7 @@ int CSearchDlg::SearchFile(std::shared_ptr sinfoPtr, const std::wst bFound = true; } } - if (type == CTextFile::Binary /* @@@ && !m_bReplace */) + if ((type == CTextFile::Binary) && !searchFlags.bReplace) { boost::regex expressionUtf16le = boost::regex(CUnicodeUtils::StdGetUTF8(searchStringUtf16le), ft); boost::spirit::classic::file_iterator<> start(filePath.c_str());