diff options
| author | armink <[email protected]> | 2018-02-23 15:24:27 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2018-02-23 15:24:27 +0800 |
| commit | 013e5bd4111ac8b88957b48d98be44c0afa045e1 (patch) | |
| tree | 52a001a26bb9379ebe7c08cef40f289bd4cc4e64 /components | |
| parent | d4dcbe0cb1030e4f1f4197c9dd81164a70a2c8b5 (diff) | |
[Components][Finsh] Add shell getchar received error process.
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index d1fadd7221..2a0637ec2c 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') { |
