[KERNEL32] GetVolumeNameForRoot: Use towupper for uppercasing the drive letter

Drive letter is a wide character, using the non-Unicode aware toupper could corrupt it.
This commit is contained in:
Adam Słaboń 2024-03-03 00:04:43 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 358fecdcf0
commit 56f6734fa5

View file

@ -61,7 +61,7 @@ GetVolumeNameForRoot(IN LPCWSTR lpszRootPath,
{
if (NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 1] == L':')
{
NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2] = _toupper(NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2]);
NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2] = towupper(NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2]);
}
}