diff options
author | ajrhacker <ajrhacker@users.noreply.github.com> | 2017-09-10 13:21:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-10 13:21:59 -0400 |
commit | 39c88f66b8bf408b09fb3e6140a276ee8858b35b (patch) | |
tree | 9e08a0381d776a4f52f4ceee13dcd613559ee199 | |
parent | 52f3296c742089660779abd5a93443b14a3f3c2a (diff) | |
parent | 3f24d4173c36889435958c2ecb006b3c45a729c3 (diff) |
Merge pull request #2646 from npwoods/use_better_utf8_from_uchar_overload
Using a better overload of utf8_from_uchar() in ioport_field::key_name (nw)
-rw-r--r-- | src/emu/ioport.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 2ee04f28072..3b408d808d2 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -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 "???"; |