Skip to content

Commit 3a7d989

Browse files
authored
Merge pull request #1228 from armink/fix_shell
[Components][Finsh] Add shell getchar received error process.
2 parents d4dcbe0 + 013e5bd commit 3a7d989

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/finsh/shell.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ void finsh_thread_entry(void *parameter)
541541
}
542542
}
543543

544-
/* handle CR key */
545-
if (ch == '\0') continue;
544+
/* received null or error */
545+
if (ch == '\0' || ch == 0xFF) continue;
546546
/* handle tab key */
547547
else if (ch == '\t')
548548
{

0 commit comments

Comments
 (0)