use read(..., ..., 1) instead of getchar

This commit is contained in:
Lion Kortlepel 2020-11-13 01:38:36 +01:00
parent aa29530d92
commit 85edadb6e4

View File

@ -87,7 +87,7 @@ void resetTermios(void) {
char getch_(int echo) {
char ch;
initTermios(echo);
ch = getchar();
read(STDIN_FILENO, &ch, 1);
resetTermios();
return ch;
}