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/burn/engine/bundlepackageengine.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 '')
| -rw-r--r-- | src/burn/engine/bundlepackageengine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp index 1a8ba982..7ada5f6a 100644 --- a/src/burn/engine/bundlepackageengine.cpp +++ b/src/burn/engine/bundlepackageengine.cpp | |||
| @@ -146,7 +146,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 146 | hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); | 146 | hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); |
| 147 | ExitOnFailure(hr, "Failed to get @Code."); | 147 | ExitOnFailure(hr, "Failed to get @Code."); |
| 148 | 148 | ||
| 149 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1)) | 149 | if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Detect", -1, FALSE)) |
| 150 | { | 150 | { |
| 151 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); | 151 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); |
| 152 | ExitOnFailure(hr, "Failed to resize Detect code array"); | 152 | ExitOnFailure(hr, "Failed to resize Detect code array"); |
| @@ -155,7 +155,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 155 | sczCode = NULL; | 155 | sczCode = NULL; |
| 156 | *pcDetectCodes += 1; | 156 | *pcDetectCodes += 1; |
| 157 | } | 157 | } |
| 158 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1)) | 158 | else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Upgrade", -1, FALSE)) |
| 159 | { | 159 | { |
| 160 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); | 160 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); |
| 161 | ExitOnFailure(hr, "Failed to resize Upgrade code array"); | 161 | ExitOnFailure(hr, "Failed to resize Upgrade code array"); |
| @@ -164,7 +164,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 164 | sczCode = NULL; | 164 | sczCode = NULL; |
| 165 | *pcUpgradeCodes += 1; | 165 | *pcUpgradeCodes += 1; |
| 166 | } | 166 | } |
| 167 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1)) | 167 | else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Addon", -1, FALSE)) |
| 168 | { | 168 | { |
| 169 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); | 169 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); |
| 170 | ExitOnFailure(hr, "Failed to resize Addon code array"); | 170 | ExitOnFailure(hr, "Failed to resize Addon code array"); |
| @@ -173,7 +173,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( | |||
| 173 | sczCode = NULL; | 173 | sczCode = NULL; |
| 174 | *pcAddonCodes += 1; | 174 | *pcAddonCodes += 1; |
| 175 | } | 175 | } |
| 176 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1)) | 176 | else if (CSTR_EQUAL == ::CompareStringOrdinal(sczAction, -1, L"Patch", -1, FALSE)) |
| 177 | { | 177 | { |
| 178 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); | 178 | hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); |
| 179 | ExitOnFailure(hr, "Failed to resize Patch code array"); | 179 | ExitOnFailure(hr, "Failed to resize Patch code array"); |
