diff --git a/components/finsh/shell.c b/components/finsh/shell.c index d1fadd722145cac7a2d6e4d93b8f925d78c8c0bc..2a0637ec2c91d64e208830e4d2e42152b164ef26 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -541,8 +541,8 @@ void finsh_thread_entry(void *parameter) } } - /* handle CR key */ - if (ch == '\0') continue; + /* received null or error */ + if (ch == '\0' || ch == 0xFF) continue; /* handle tab key */ else if (ch == '\t') {