From: Brock Mammen Date: Wed, 21 Aug 2019 02:51:37 +0000 (-0500) Subject: [SHELLFIND] Use case-insensitive string comparison X-Git-Tag: 0.4.14-dev~106 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a905699ac629c303b987bf125662aa454ec33634 [SHELLFIND] Use case-insensitive string comparison --- 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);