diff options
| author | Rob Mensching <rob@firegiant.com> | 2025-11-01 20:24:25 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2025-11-03 14:49:39 -0800 |
| commit | 4d626c294c4783d454e27ea4e5614037dac8576e (patch) | |
| tree | 51d822f48716e4c5ef2a51ca28925896f221b521 /src/burn/engine/msiengine.cpp | |
| parent | 33c12fa386aa7ace7a6bd06a45bc3ecf17e9c8f5 (diff) | |
| download | wix-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/msiengine.cpp')
| -rw-r--r-- | src/burn/engine/msiengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/burn/engine/msiengine.cpp b/src/burn/engine/msiengine.cpp index d5268b17..86fb0d9d 100644 --- a/src/burn/engine/msiengine.cpp +++ b/src/burn/engine/msiengine.cpp | |||
| @@ -523,7 +523,7 @@ extern "C" HRESULT MsiEngineDetectPackage( | |||
| 523 | ExitOnFailure(hr, "Failed to enum related products."); | 523 | ExitOnFailure(hr, "Failed to enum related products."); |
| 524 | 524 | ||
| 525 | // If we found ourselves, skip because saying that a package is related to itself is nonsensical. | 525 | // If we found ourselves, skip because saying that a package is related to itself is nonsensical. |
| 526 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pPackage->Msi.sczProductCode, -1, wzProductCode, -1)) | 526 | if (CSTR_EQUAL == ::CompareStringOrdinal(pPackage->Msi.sczProductCode, -1, wzProductCode, -1, TRUE)) |
| 527 | { | 527 | { |
| 528 | continue; | 528 | continue; |
| 529 | } | 529 | } |
| @@ -631,7 +631,7 @@ extern "C" HRESULT MsiEngineDetectPackage( | |||
| 631 | } | 631 | } |
| 632 | // It can't be a downgrade if the upgrade codes aren't the same. | 632 | // It can't be a downgrade if the upgrade codes aren't the same. |
| 633 | else if (BOOTSTRAPPER_PACKAGE_STATE_ABSENT == pPackage->currentState && | 633 | else if (BOOTSTRAPPER_PACKAGE_STATE_ABSENT == pPackage->currentState && |
| 634 | pPackage->Msi.sczUpgradeCode && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pPackage->Msi.sczUpgradeCode, -1, pRelatedMsi->sczUpgradeCode, -1)) | 634 | pPackage->Msi.sczUpgradeCode && CSTR_EQUAL == ::CompareStringOrdinal(pPackage->Msi.sczUpgradeCode, -1, pRelatedMsi->sczUpgradeCode, -1, TRUE)) |
| 635 | { | 635 | { |
| 636 | relatedMsiOperation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; | 636 | relatedMsiOperation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; |
| 637 | pPackage->Msi.operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; | 637 | pPackage->Msi.operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; |
