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

Ignore '\0' input in CLI

This commit is contained in:
whowechina 2024-04-27 14:41:19 +08:00
parent 4a2e975580
commit 9f8a3860c1

View File

@ -150,6 +150,9 @@ void cli_run()
if (c == EOF) { if (c == EOF) {
return; return;
} }
if (c == 0) {
return;
}
if (c == '\b' || c == 127) { // both backspace and delete if (c == '\b' || c == 127) { // both backspace and delete
if (cmd_len > 0) { if (cmd_len > 0) {