diff options
Diffstat (limited to 'src/burn/engine/condition.cpp')
| -rw-r--r-- | src/burn/engine/condition.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/burn/engine/condition.cpp b/src/burn/engine/condition.cpp index 8fa62f16..3719ce79 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; |
| @@ -928,7 +928,7 @@ static HRESULT CompareStringValues( | |||
| 928 | ) | 928 | ) |
| 929 | { | 929 | { |
| 930 | HRESULT hr = S_OK; | 930 | HRESULT hr = S_OK; |
| 931 | DWORD dwCompareString = (comparison & INSENSITIVE) ? NORM_IGNORECASE : 0; | 931 | BOOL fIgnoreCase = (comparison & INSENSITIVE) ? TRUE : FALSE; |
| 932 | size_t cchLeftSize = 0; | 932 | size_t cchLeftSize = 0; |
| 933 | size_t cchRightSize = 0; | 933 | size_t cchRightSize = 0; |
| 934 | int cchLeft = 0; | 934 | int cchLeft = 0; |
| @@ -958,7 +958,7 @@ static HRESULT CompareStringValues( | |||
| 958 | case BURN_SYMBOL_TYPE_EQ_I: | 958 | case BURN_SYMBOL_TYPE_EQ_I: |
| 959 | case BURN_SYMBOL_TYPE_NE_I: | 959 | case BURN_SYMBOL_TYPE_NE_I: |
| 960 | { | 960 | { |
| 961 | int i = ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchLeft, wzRightOperand, cchRight); | 961 | int i = ::CompareStringOrdinal(wzLeftOperand, cchLeft, wzRightOperand, cchRight, fIgnoreCase); |
| 962 | hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult); | 962 | hr = CompareIntegerValues(comparison, i, CSTR_EQUAL, pfResult); |
| 963 | } | 963 | } |
| 964 | break; | 964 | break; |
| @@ -967,7 +967,7 @@ static HRESULT CompareStringValues( | |||
| 967 | // test if left string contains right string | 967 | // test if left string contains right string |
| 968 | for (int i = 0; (i + cchRight) <= cchLeft; ++i) | 968 | for (int i = 0; (i + cchRight) <= cchLeft; ++i) |
| 969 | { | 969 | { |
| 970 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + i, cchRight, wzRightOperand, cchRight)) | 970 | if (CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + i, cchRight, wzRightOperand, cchRight, fIgnoreCase)) |
| 971 | { | 971 | { |
| 972 | *pfResult = TRUE; | 972 | *pfResult = TRUE; |
| 973 | ExitFunction(); | 973 | ExitFunction(); |
| @@ -978,12 +978,12 @@ static HRESULT CompareStringValues( | |||
| 978 | case BURN_SYMBOL_TYPE_HIEQ: | 978 | case BURN_SYMBOL_TYPE_HIEQ: |
| 979 | case BURN_SYMBOL_TYPE_HIEQ_I: | 979 | case BURN_SYMBOL_TYPE_HIEQ_I: |
| 980 | // test if left string starts with right string | 980 | // test if left string starts with right string |
| 981 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand, cchRight, wzRightOperand, cchRight); | 981 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand, cchRight, wzRightOperand, cchRight, fIgnoreCase); |
| 982 | break; | 982 | break; |
| 983 | case BURN_SYMBOL_TYPE_LOEQ: | 983 | case BURN_SYMBOL_TYPE_LOEQ: |
| 984 | case BURN_SYMBOL_TYPE_LOEQ_I: | 984 | case BURN_SYMBOL_TYPE_LOEQ_I: |
| 985 | // test if left string ends with right string | 985 | // test if left string ends with right string |
| 986 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, dwCompareString, wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight); | 986 | *pfResult = cchLeft >= cchRight && CSTR_EQUAL == ::CompareStringOrdinal(wzLeftOperand + (cchLeft - cchRight), cchRight, wzRightOperand, cchRight, fIgnoreCase); |
| 987 | break; | 987 | break; |
| 988 | default: | 988 | default: |
| 989 | ExitFunction1(hr = E_INVALIDARG); | 989 | ExitFunction1(hr = E_INVALIDARG); |
