From 333dcda41841017ee19a462af24202b76581f16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 17 Feb 2006 12:21:28 +0000 Subject: [PATCH] The kernel debugger now only puts printable characters into the input buffer. This should eliminate the cases where commands doesn't seem to be accepted (but look fine on screen). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16453 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/debug/debug.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/debug/debug.c b/src/system/kernel/debug/debug.c index b7263e5a8e..ea6e5c0b98 100644 --- a/src/system/kernel/debug/debug.c +++ b/src/system/kernel/debug/debug.c @@ -231,9 +231,13 @@ read_line(char *buffer, int32 maxLength) } /* supposed to fall through */ default: - buffer[position++] = c; - kputchar(c); + if (isprint(c)) { + buffer[position++] = c; + kputchar(c); + } + break; } + if (position >= maxLength - 2) { buffer[position++] = '\0'; kputchar('\n');