mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Merge PR #2524: OSInfo: fix implicit size_t conversion.
This commit is contained in:
commit
fc9dc2e464
@ -34,7 +34,9 @@ static QString regString(wchar_t *string, int size) {
|
||||
// that the NUL is not included in the returned
|
||||
// string.
|
||||
const size_t adjustedSize = wcsnlen(string, static_cast<size_t>(size));
|
||||
return QString::fromWCharArray(string, adjustedSize);
|
||||
// The return value of wcsnlen is <= size which is
|
||||
// an int, so casting adjustedSize to int is safe.
|
||||
return QString::fromWCharArray(string, static_cast<int>(adjustedSize));
|
||||
}
|
||||
|
||||
/// Query for a Windows 10-style displayable version.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user