Using a better overload of utf8_from_uchar() in ioport_field::key_name (nw)

This commit is contained in:
Nathan Woods 2017-09-10 09:17:55 -04:00
parent 4a422c0495
commit 3f24d4173c

View File

@ -841,12 +841,7 @@ std::string ioport_field::key_name(int which) const
// if that doesn't work, convert to UTF-8
if (ch > 0x7F || isprint(ch))
{
char buf[10];
int count = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch);
buf[count] = 0;
return std::string(buf);
}
return utf8_from_uchar(ch);
// otherwise, opt for question marks
return "???";