aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/dependency.cpp
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2025-11-01 20:24:25 -0700
committerRob Mensching <rob@firegiant.com>2025-11-03 14:49:39 -0800
commit4d626c294c4783d454e27ea4e5614037dac8576e (patch)
tree51d822f48716e4c5ef2a51ca28925896f221b521 /src/burn/engine/dependency.cpp
parent33c12fa386aa7ace7a6bd06a45bc3ecf17e9c8f5 (diff)
downloadwix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.gz
wix-4d626c294c4783d454e27ea4e5614037dac8576e.tar.bz2
wix-4d626c294c4783d454e27ea4e5614037dac8576e.zip
Use CompareStringOrdinal() instead of CompareString() case-insensitive
This commit moves to the modern CompareStringOrdinal() for all case-insensitve uses of CompareString() with the invariant locale. Partially resolves 6947
Diffstat (limited to 'src/burn/engine/dependency.cpp')
-rw-r--r--src/burn/engine/dependency.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/burn/engine/dependency.cpp b/src/burn/engine/dependency.cpp
index f398a070..767d5004 100644
--- a/src/burn/engine/dependency.cpp
+++ b/src/burn/engine/dependency.cpp
@@ -263,7 +263,7 @@ extern "C" HRESULT DependencyDetectProviderKeyBundleCode(
263 hr = StrAllocString(&pRegistration->sczDetectedProviderKeyBundleCode, pRegistration->sczProviderKey, 0); 263 hr = StrAllocString(&pRegistration->sczDetectedProviderKeyBundleCode, pRegistration->sczProviderKey, 0);
264 ExitOnFailure(hr, "Failed to initialize provider key bundle code."); 264 ExitOnFailure(hr, "Failed to initialize provider key bundle code.");
265 } 265 }
266 else if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczCode, -1, pRegistration->sczDetectedProviderKeyBundleCode, -1)) 266 else if (CSTR_EQUAL != ::CompareStringOrdinal(pRegistration->sczCode, -1, pRegistration->sczDetectedProviderKeyBundleCode, -1, TRUE))
267 { 267 {
268 pRegistration->fDetectedForeignProviderKeyBundleCode = TRUE; 268 pRegistration->fDetectedForeignProviderKeyBundleCode = TRUE;
269 LogId(REPORT_STANDARD, MSG_DETECTED_FOREIGN_BUNDLE_PROVIDER_REGISTRATION, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleCode); 269 LogId(REPORT_STANDARD, MSG_DETECTED_FOREIGN_BUNDLE_PROVIDER_REGISTRATION, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleCode);
@@ -293,12 +293,12 @@ extern "C" HRESULT DependencyDetectBundle(
293 { 293 {
294 DEPENDENCY* pDependent = pRegistration->rgDependents + i; 294 DEPENDENCY* pDependent = pRegistration->rgDependents + i;
295 295
296 if (pDependencies->fActiveParent && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pDependencies->wzActiveParent, -1, pDependent->sczKey, -1)) 296 if (pDependencies->fActiveParent && CSTR_EQUAL == ::CompareStringOrdinal(pDependencies->wzActiveParent, -1, pDependent->sczKey, -1, TRUE))
297 { 297 {
298 pRegistration->fParentRegisteredAsDependent = TRUE; 298 pRegistration->fParentRegisteredAsDependent = TRUE;
299 } 299 }
300 300
301 if (pDependencies->fSelfDependent && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pDependencies->wzSelfDependent, -1, pDependent->sczKey, -1)) 301 if (pDependencies->fSelfDependent && CSTR_EQUAL == ::CompareStringOrdinal(pDependencies->wzSelfDependent, -1, pDependent->sczKey, -1, TRUE))
302 { 302 {
303 pRegistration->fSelfRegisteredAsDependent = TRUE; 303 pRegistration->fSelfRegisteredAsDependent = TRUE;
304 } 304 }
@@ -905,7 +905,7 @@ extern "C" HRESULT DependencyDetectCompatibleEntry(
905 continue; 905 continue;
906 } 906 }
907 } 907 }
908 else if (sczId && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, wzPackageProviderId, -1, sczId, -1)) 908 else if (sczId && CSTR_EQUAL == ::CompareStringOrdinal(wzPackageProviderId, -1, sczId, -1, TRUE))
909 { 909 {
910 continue; 910 continue;
911 } 911 }
@@ -969,7 +969,7 @@ static HRESULT DetectPackageDependents(
969 { 969 {
970 DEPENDENCY* pDependent = pProvider->rgDependents + iDependent; 970 DEPENDENCY* pDependent = pProvider->rgDependents + iDependent;
971 971
972 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczCode, -1, pDependent->sczKey, -1)) 972 if (CSTR_EQUAL == ::CompareStringOrdinal(pRegistration->sczCode, -1, pDependent->sczKey, -1, TRUE))
973 { 973 {
974 pProvider->fBundleRegisteredAsDependent = TRUE; 974 pProvider->fBundleRegisteredAsDependent = TRUE;
975 fBundleRegisteredAsDependent = TRUE; 975 fBundleRegisteredAsDependent = TRUE;
@@ -1043,7 +1043,7 @@ static HRESULT SplitIgnoreDependencies(
1043 hr = DictAddKey(sdIgnoreDependencies, wzToken); 1043 hr = DictAddKey(sdIgnoreDependencies, wzToken);
1044 ExitOnFailure(hr, "Failed to add \"%ls\" to the string dictionary.", wzToken); 1044 ExitOnFailure(hr, "Failed to add \"%ls\" to the string dictionary.", wzToken);
1045 1045
1046 if (!*pfIgnoreAll && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, L"ALL", -1, wzToken, -1)) 1046 if (!*pfIgnoreAll && CSTR_EQUAL == ::CompareStringOrdinal(L"ALL", -1, wzToken, -1, TRUE))
1047 { 1047 {
1048 *pfIgnoreAll = TRUE; 1048 *pfIgnoreAll = TRUE;
1049 } 1049 }