From d2ba0da55725f2908b67e1470afc7cfd71cb3d1f Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 1 Nov 2025 21:52:31 -0700 Subject: Use CompareStringOrdinal() instead of CompareString() case-sensitive This commit moves to the modern CompareStringOrdinal() for all case-sensitve uses of CompareString() with the invariant locale. Resolves 6947 --- src/ext/Util/be/utilsearch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ext/Util') diff --git a/src/ext/Util/be/utilsearch.cpp b/src/ext/Util/be/utilsearch.cpp index 59c497e3..a0818963 100644 --- a/src/ext/Util/be/utilsearch.cpp +++ b/src/ext/Util/be/utilsearch.cpp @@ -47,7 +47,7 @@ STDMETHODIMP UtilSearchParseFromXml( BextExitOnFailure(hr, "Failed to get @Id."); // Read type specific attributes. - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"WixWindowsFeatureSearch", -1, FALSE)) { pSearch->Type = UTIL_SEARCH_TYPE_WINDOWS_FEATURE_SEARCH; @@ -55,7 +55,7 @@ STDMETHODIMP UtilSearchParseFromXml( hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); BextExitOnFailure(hr, "Failed to get @Type."); - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"sha2CodeSigning", -1, FALSE)) { pSearch->WindowsFeatureSearch.type = UTIL_WINDOWS_FEATURE_SEARCH_TYPE_SHA2_CODE_SIGNING; } @@ -144,7 +144,7 @@ STDMETHODIMP UtilSearchFindById( { UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pSearch->sczId, -1, wzId, -1)) + if (CSTR_EQUAL == ::CompareStringOrdinal(pSearch->sczId, -1, wzId, -1, FALSE)) { *ppSearch = pSearch; ExitFunction1(hr = S_OK); -- cgit v1.2.3-55-g6feb