summaryrefslogtreecommitdiffstats
path: root/src/core/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/debug.c')
-rw-r--r--src/core/debug.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/debug.c b/src/core/debug.c
index 627d5d9a1..2161f9731 100644
--- a/src/core/debug.c
+++ b/src/core/debug.c
@@ -22,6 +22,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
+#include <ctype.h>
#include <ipxe/console.h>
/**
@@ -96,9 +97,7 @@ static void dbg_hex_dump_da_row ( unsigned long dispaddr, const void *data,
continue;
}
byte = bytes[i];
- if ( ( byte < 0x20 ) || ( byte >= 0x7f ) )
- byte = '.';
- dbg_printf ( "%c", byte );
+ dbg_printf ( "%c", ( isprint ( byte ) ? byte : '.' ) );
}
dbg_printf ( "\n" );
}