提交 d2e64d29 编写于 作者: S Steve Bennett 提交者: Tom Rini

cli_readline: Only insert printable chars

There should be no need to insert non-printable characters
and this prevents line editing getting confused.
Signed-off-by: NSteve Bennett <steveb@workware.net.au>
上级 652b504f
......@@ -493,8 +493,10 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
}
#endif
default:
cread_add_char(ichar, insert, &num, &eol_num, buf,
*len);
if (ichar >= ' ' && ichar <= '~') {
cread_add_char(ichar, insert, &num, &eol_num,
buf, *len);
}
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册