aboutsummaryrefslogtreecommitdiff
path: root/src/tools/thmviewer
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/tools/thmviewer
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/tools/thmviewer')
-rw-r--r--src/tools/thmviewer/load.cpp2
-rw-r--r--src/tools/thmviewer/thmviewer.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/thmviewer/load.cpp b/src/tools/thmviewer/load.cpp
index 924f373d..ca1460e3 100644
--- a/src/tools/thmviewer/load.cpp
+++ b/src/tools/thmviewer/load.cpp
@@ -152,7 +152,7 @@ static DWORD WINAPI LoadThreadProc(
152 // If our file was updated, check to see if the modified time really changed. The notifications 152 // If our file was updated, check to see if the modified time really changed. The notifications
153 // are often trigger happy thinking the file changed two or three times in a row. Maybe it's AV 153 // are often trigger happy thinking the file changed two or three times in a row. Maybe it's AV
154 // software creating the problems but actually checking the modified date works well. 154 // software creating the problems but actually checking the modified date works well.
155 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pNotification->FileName, pNotification->FileNameLength / sizeof(WCHAR), wzFileName, -1)) 155 if (CSTR_EQUAL == ::CompareStringOrdinal(pNotification->FileName, pNotification->FileNameLength / sizeof(WCHAR), wzFileName, -1, TRUE))
156 { 156 {
157 FILETIME ft = { }; 157 FILETIME ft = { };
158 FileGetTime(sczThemePath, NULL, NULL, &ft); 158 FileGetTime(sczThemePath, NULL, NULL, &ft);
diff --git a/src/tools/thmviewer/thmviewer.cpp b/src/tools/thmviewer/thmviewer.cpp
index 5d4b88f5..69a9920b 100644
--- a/src/tools/thmviewer/thmviewer.cpp
+++ b/src/tools/thmviewer/thmviewer.cpp
@@ -241,7 +241,7 @@ static HRESULT ProcessCommandLine(
241 { 241 {
242 if (argv[i][0] == L'-' || argv[i][0] == L'/') 242 if (argv[i][0] == L'-' || argv[i][0] == L'/')
243 { 243 {
244 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1)) 244 if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"lang", -1, TRUE))
245 { 245 {
246 if (i + 1 >= argc) 246 if (i + 1 >= argc)
247 { 247 {
@@ -254,7 +254,7 @@ static HRESULT ProcessCommandLine(
254 else 254 else
255 { 255 {
256 LPCWSTR wzExtension = PathExtension(argv[i]); 256 LPCWSTR wzExtension = PathExtension(argv[i]);
257 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzExtension, -1, L".wxl", -1)) 257 if (CSTR_EQUAL == ::CompareStringOrdinal(wzExtension, -1, L".wxl", -1, TRUE))
258 { 258 {
259 hr = StrAllocString(psczWxlFile, argv[i], 0); 259 hr = StrAllocString(psczWxlFile, argv[i], 0);
260 } 260 }