1
0
mirror of https://github.com/whowechina/chu_pico.git synced 2024-11-28 04:30:49 +01:00

Fix unhandled serial input error code

This commit is contained in:
Wang Gang 2024-11-27 08:13:58 +08:00
parent 14360e90dc
commit eaffb198f5

View File

@ -176,7 +176,7 @@ void cli_run()
} }
int c = getchar_timeout_us(0); int c = getchar_timeout_us(0);
if (c == EOF) { if (c < 0) {
return; return;
} }
if (c == 0) { if (c == 0) {