diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 21:52:31 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | d2ba0da55725f2908b67e1470afc7cfd71cb3d1f (patch) | |
| tree | c2a1db61c5fac031c698976106bba2c453d85ded /src/ext/Util/be/utilsearch.cpp | |
| parent | 4d626c294c4783d454e27ea4e5614037dac8576e (diff) | |
| download | wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.gz wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.tar.bz2 wix-d2ba0da55725f2908b67e1470afc7cfd71cb3d1f.zip | |
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
Diffstat (limited to 'src/ext/Util/be/utilsearch.cpp')
| -rw-r--r-- | src/ext/Util/be/utilsearch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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( | |||
| 47 | BextExitOnFailure(hr, "Failed to get @Id."); | 47 | BextExitOnFailure(hr, "Failed to get @Id."); |
| 48 | 48 | ||
| 49 | // Read type specific attributes. | 49 | // Read type specific attributes. |
| 50 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, bstrNodeName, -1, L"WixWindowsFeatureSearch", -1)) | 50 | if (CSTR_EQUAL == ::CompareStringOrdinal(bstrNodeName, -1, L"WixWindowsFeatureSearch", -1, FALSE)) |
| 51 | { | 51 | { |
| 52 | pSearch->Type = UTIL_SEARCH_TYPE_WINDOWS_FEATURE_SEARCH; | 52 | pSearch->Type = UTIL_SEARCH_TYPE_WINDOWS_FEATURE_SEARCH; |
| 53 | 53 | ||
| @@ -55,7 +55,7 @@ STDMETHODIMP UtilSearchParseFromXml( | |||
| 55 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); | 55 | hr = XmlGetAttributeEx(pixnNode, L"Type", &scz); |
| 56 | BextExitOnFailure(hr, "Failed to get @Type."); | 56 | BextExitOnFailure(hr, "Failed to get @Type."); |
| 57 | 57 | ||
| 58 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"sha2CodeSigning", -1)) | 58 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"sha2CodeSigning", -1, FALSE)) |
| 59 | { | 59 | { |
| 60 | pSearch->WindowsFeatureSearch.type = UTIL_WINDOWS_FEATURE_SEARCH_TYPE_SHA2_CODE_SIGNING; | 60 | pSearch->WindowsFeatureSearch.type = UTIL_WINDOWS_FEATURE_SEARCH_TYPE_SHA2_CODE_SIGNING; |
| 61 | } | 61 | } |
| @@ -144,7 +144,7 @@ STDMETHODIMP UtilSearchFindById( | |||
| 144 | { | 144 | { |
| 145 | UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; | 145 | UTIL_SEARCH* pSearch = &pSearches->rgSearches[i]; |
| 146 | 146 | ||
| 147 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pSearch->sczId, -1, wzId, -1)) | 147 | if (CSTR_EQUAL == ::CompareStringOrdinal(pSearch->sczId, -1, wzId, -1, FALSE)) |
| 148 | { | 148 | { |
| 149 | *ppSearch = pSearch; | 149 | *ppSearch = pSearch; |
| 150 | ExitFunction1(hr = S_OK); | 150 | ExitFunction1(hr = S_OK); |
