r_cons_yesno() is now echo-ing the pressed key

This commit is contained in:
pancake 2018-03-07 01:19:04 +01:00
parent ca8eac68c2
commit 6ac290eaec

View File

@ -489,6 +489,8 @@ R_API int r_cons_yesno(int def, const char *fmt, ...) {
fflush (stderr);
r_cons_set_raw (true);
(void)read (0, &key, 1);
write (2, " ", 1);
write (2, &key, 1);
write (2, "\n", 1);
if (key == 'Y') {
key = 'y';