aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/condition.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/condition.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/condition.cpp')
-rw-r--r--src/burn/engine/condition.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/burn/engine/condition.cpp b/src/burn/engine/condition.cpp
index 8fa62f16..ecce2d5c 100644
--- a/src/burn/engine/condition.cpp
+++ b/src/burn/engine/condition.cpp
@@ -740,17 +740,17 @@ static HRESULT NextSymbol(
740 ::GetStringTypeW(CT_CTYPE1, &pContext->wzRead[n], 1, &charType); 740 ::GetStringTypeW(CT_CTYPE1, &pContext->wzRead[n], 1, &charType);
741 } while (C1_ALPHA & charType || C1_DIGIT & charType || L'_' == pContext->wzRead[n]); 741 } while (C1_ALPHA & charType || C1_DIGIT & charType || L'_' == pContext->wzRead[n]);
742 742
743 if (2 == n && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pContext->wzRead, 2, L"OR", 2)) 743 if (2 == n && CSTR_EQUAL == ::CompareStringOrdinal(pContext->wzRead, 2, L"OR", 2, TRUE))
744 { 744 {
745 // OR 745 // OR
746 pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_OR; 746 pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_OR;
747 } 747 }
748 else if (3 == n && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pContext->wzRead, 3, L"AND", 3)) 748 else if (3 == n && CSTR_EQUAL == ::CompareStringOrdinal(pContext->wzRead, 3, L"AND", 3, TRUE))
749 { 749 {
750 // AND 750 // AND
751 pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_AND; 751 pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_AND;
752 } 752 }
753 else if (3 == n && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, pContext->wzRead, 3, L"NOT", 3)) 753 else if (3 == n && CSTR_EQUAL == ::CompareStringOrdinal(pContext->wzRead, 3, L"NOT", 3, TRUE))
754 { 754 {
755 // NOT 755 // NOT
756 pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_NOT; 756 pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_NOT;