Uthernet 2: use isprint();

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2021-04-28 20:36:03 +01:00
parent 1c9beb246b
commit 8fd0b0f5a6

View file

@ -657,20 +657,7 @@ namespace
#ifdef U2_LOG_VERBOSE
const char * mode = write ? "WRITE " : "READ ";
char c;
switch (res)
{
case 'A'...'Z':
case 'a'...'z':
case '0'...'9':
c = res;
break;
default:
c = '.';
break;
}
const char c = std::isprint(res) ? res : '.';
LogFileOutput("U2: %04x: %s %04x %02x = %02x, %c\n", programcounter, mode, address, value, res, c);
#endif