Fix getchar return handling

This commit is contained in:
whowechina 2024-11-29 21:34:53 +08:00
parent d789500959
commit 2326b411ec
2 changed files with 1 additions and 4 deletions

Binary file not shown.

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;
}