1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 02:35:46 +01:00

Fix undefined use of cctype functions

This commit is contained in:
Hielke Morsink
2021-10-28 10:54:09 +02:00
parent b21643a692
commit 76b5479bbb
7 changed files with 16 additions and 15 deletions

View File

@@ -392,9 +392,10 @@ namespace OpenRCT2::Ui
{
filtersb << ' ';
}
else if (isalpha(c))
else if (isalpha(static_cast<unsigned char>(c)))
{
filtersb << '[' << static_cast<char>(tolower(c)) << static_cast<char>(toupper(c)) << ']';
auto uc = static_cast<unsigned char>(c);
filtersb << '[' << static_cast<char>(tolower(uc)) << static_cast<char>(toupper(uc)) << ']';
}
else
{