mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-26 07:17:10 +00:00
cli_readline: Only insert printable chars
There should be no need to insert non-printable characters and this prevents line editing getting confused. Signed-off-by: Steve Bennett <steveb@workware.net.au>
This commit is contained in:
parent
652b504ff2
commit
d2e64d29c4
1 changed files with 4 additions and 2 deletions
|
@ -493,8 +493,10 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
cread_add_char(ichar, insert, &num, &eol_num, buf,
|
if (ichar >= ' ' && ichar <= '~') {
|
||||||
*len);
|
cread_add_char(ichar, insert, &num, &eol_num,
|
||||||
|
buf, *len);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue