X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=common%2Fcli_readline.c;h=99b631720e17b02fdc41f524d7a733b19bb72750;hb=387c44904d4706325715d58e17fd3789596e0a26;hp=60a232b065e821bd3294f10fa3b39b6daf99ad48;hpb=e8f80a5a58c9b506453cc0780687e8ed457d30a6;p=oweals%2Fu-boot.git diff --git a/common/cli_readline.c b/common/cli_readline.c index 60a232b065..99b631720e 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -273,6 +273,10 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len, ichar = getcmd_getch(); + /* ichar=0x0 when error occurs in U-Boot getc */ + if (!ichar) + continue; + if ((ichar == '\n') || (ichar == '\r')) { putc('\n'); break;