浏览代码

[Components][Finsh] Add shell getchar received error process.

armink 7 年之前
父节点
当前提交
013e5bd411
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      components/finsh/shell.c

+ 2 - 2
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')
         {