Fix getchar return handling

This commit is contained in:
whowechina
2024-12-01 12:10:08 +08:00
parent 811892b4e1
commit fe7cb460a8
2 changed files with 1 additions and 4 deletions
Binary file not shown.
+1 -4
View File
@@ -168,10 +168,7 @@ void cli_run()
printf("\n%s", cli_prompt);
}
int c = getchar_timeout_us(0);
if (c == EOF) {
return;
}
if (c == 0) {
if (c < 0) {
return;
}