From a905699ac629c303b987bf125662aa454ec33634 Mon Sep 17 00:00:00 2001 From: Brock Mammen Date: Tue, 20 Aug 2019 21:51:37 -0500 Subject: [PATCH] [SHELLFIND] Use case-insensitive string comparison --- dll/win32/browseui/shellfind/CFindFolder.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dll/win32/browseui/shellfind/CFindFolder.cpp b/dll/win32/browseui/shellfind/CFindFolder.cpp index 198ccfb1245..5eb3b9b4454 100644 --- a/dll/win32/browseui/shellfind/CFindFolder.cpp +++ b/dll/win32/browseui/shellfind/CFindFolder.cpp @@ -117,14 +117,14 @@ static UINT StrStrNCount(const TChar *lpFirst, const TString &lpSrch, UINT cchMa return uCount; } -static UINT StrStrCountA(const CHAR *lpFirst, const CStringA &lpSrch, UINT cchMax) +static UINT StrStrCountNIA(const CHAR *lpFirst, const CStringA &lpSrch, UINT cchMax) { - return StrStrNCount(lpFirst, lpSrch, cchMax); + return StrStrNCount(lpFirst, lpSrch, cchMax); } -static UINT StrStrCountW(const WCHAR *lpFirst, const CStringW &lpSrch, UINT cchMax) +static UINT StrStrCountNIW(const WCHAR *lpFirst, const CStringW &lpSrch, UINT cchMax) { - return StrStrNCount(lpFirst, lpSrch, cchMax); + return StrStrNCount(lpFirst, lpSrch, cchMax); } static UINT SearchFile(LPCWSTR lpFilePath, _SearchData *pSearchData) @@ -148,11 +148,11 @@ static UINT SearchFile(LPCWSTR lpFilePath, _SearchData *pSearchData) // Check for UTF-16 BOM if (size >= 2 && lpFileContent[0] == 0xFF && lpFileContent[1] == 0xFE) { - uMatches = StrStrCountW((LPCWSTR) lpFileContent, pSearchData->szQueryW, size / sizeof(WCHAR)); + uMatches = StrStrCountNIW((LPCWSTR) lpFileContent, pSearchData->szQueryW, size / sizeof(WCHAR)); } else { - uMatches = StrStrCountA((LPCSTR) lpFileContent, pSearchData->szQueryA, size / sizeof(CHAR)); + uMatches = StrStrCountNIA((LPCSTR) lpFileContent, pSearchData->szQueryA, size / sizeof(CHAR)); } UnmapViewOfFile(lpFileContent); -- 2.17.1