Преглед изворни кода

Merge pull request #1228 from armink/fix_shell

[Components][Finsh] Add shell getchar received error process.
Bernard Xiong пре 7 година
родитељ
комит
3a7d989d7f
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')
         {