소스 검색

[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')
         {