summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/coreinfo/bootlog_module.c2
-rw-r--r--payloads/coreinfo/ramdump_module.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/payloads/coreinfo/bootlog_module.c b/payloads/coreinfo/bootlog_module.c
index 74424e2df6..1dc7bbec70 100644
--- a/payloads/coreinfo/bootlog_module.c
+++ b/payloads/coreinfo/bootlog_module.c
@@ -63,7 +63,7 @@ static int bootlog_module_redraw(WINDOW *win)
/* FIXME: Handle lines longer than 80 characters. */
while (y <= 18) {
- mvwaddnstr(win, y + 2, x, tmp, 1);
+ mvwaddch(win, y + 2, x, isprint(*tmp) ? *tmp : ' ');
x++;
tmp++;
if (*tmp == '\n') {
diff --git a/payloads/coreinfo/ramdump_module.c b/payloads/coreinfo/ramdump_module.c
index 019b3d9deb..04a9f0955d 100644
--- a/payloads/coreinfo/ramdump_module.c
+++ b/payloads/coreinfo/ramdump_module.c
@@ -44,7 +44,8 @@ static void dump_ram(WINDOW *win, uint32_t addr, int row, int col)
mvwaddch(win, row + y, col + 76, '|');
}
mvwprintw(win, row + y, col + x + 9, "%02x", ptr[i - 1]);
- mvwprintw(win, row + y, 62 + count++, "%c", ptr[i - 1]);
+ mvwprintw(win, row + y, 62 + count++, "%c",
+ isprint(ptr[i - 1]) ? ptr[i - 1] : ' ');
x += 3;
if (x == 24) /* One more space after column/byte 8. */
x++;