From 5ec1e993b4d2ae17c21e0adcafb6fdf29b1f1fcf Mon Sep 17 00:00:00 2001 From: Piotr Durlej Date: Sat, 11 Jan 2020 08:14:46 +0000 Subject: [PATCH] read_line: skip characters > 255 --- kernel/chario.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/chario.c b/kernel/chario.c index b5853d5..529a88d 100644 --- a/kernel/chario.c +++ b/kernel/chario.c @@ -497,6 +497,8 @@ void read_line(int sft_in, int sft_out, keyboard FAR * kp) /* fall through */ default: + if (c >= 256) + break; if (count < size - 1 || c == CR) local_buffer[count++] = echo_char(c, sft_out); else