[ui] fix regression in conditional expression and use %c always

* This fixes the regression introduced in c28f9bc491.
* 'if ((a && !b) || (!a && b))' can not always be simplified as 'if (a != b)' when the types for 'a' and 'b' are not straight booleans.
* Closes #1862
* Also drop the use of '%C' in printf() expression, as it is intended to print wide characters and not turn a char to uppercase.
This commit is contained in:
Pete Batard 2022-01-31 16:55:42 +00:00
parent 891eb45549
commit 036f6260c5
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
6 changed files with 40 additions and 38 deletions

View file

@ -939,7 +939,7 @@ BOOL GetDevices(DWORD devnum)
}
// Make sure that we don't list any drive that should not be listed
if (remove_drive) {
uprintf("Removing %C: from the list: This is the %s!", drive_letters[--k],
uprintf("Removing %c: from the list: This is the %s!", toupper(drive_letters[--k]),
(remove_drive==1)?"disk from which " APPLICATION_NAME " is running":"system disk");
safe_free(devint_detail_data);
break;