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/registration.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 'src/burn/engine/registration.cpp')
| -rw-r--r-- | src/burn/engine/registration.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 966fc849..9733e92c 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp | |||
| @@ -223,15 +223,15 @@ extern "C" HRESULT RegistrationParseFromXml( | |||
| 223 | 223 | ||
| 224 | if (fFoundXml) | 224 | if (fFoundXml) |
| 225 | { | 225 | { |
| 226 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"button", -1)) | 226 | if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"button", -1, FALSE)) |
| 227 | { | 227 | { |
| 228 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON; | 228 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE_BUTTON; |
| 229 | } | 229 | } |
| 230 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"yes", -1)) | 230 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"yes", -1, FALSE)) |
| 231 | { | 231 | { |
| 232 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE; | 232 | pRegistration->modify = BURN_REGISTRATION_MODIFY_DISABLE; |
| 233 | } | 233 | } |
| 234 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"no", -1)) | 234 | else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"no", -1, FALSE)) |
| 235 | { | 235 | { |
| 236 | pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED; | 236 | pRegistration->modify = BURN_REGISTRATION_MODIFY_ENABLED; |
| 237 | } | 237 | } |
| @@ -1512,7 +1512,7 @@ static HRESULT RemoveUpdateRegistration( | |||
| 1512 | hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion); | 1512 | hr = RegReadString(hkKey, L"PackageVersion", &sczPackageVersion); |
| 1513 | if (SUCCEEDED(hr)) | 1513 | if (SUCCEEDED(hr)) |
| 1514 | { | 1514 | { |
| 1515 | if (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1)) | 1515 | if (CSTR_EQUAL != ::CompareStringOrdinal(sczPackageVersion, -1, pRegistration->sczDisplayVersion, -1, FALSE)) |
| 1516 | { | 1516 | { |
| 1517 | fDeleteRegKey = FALSE; | 1517 | fDeleteRegKey = FALSE; |
| 1518 | } | 1518 | } |
