fix ignored return value in getch_

This commit is contained in:
Lion Kortlepel
2022-09-26 12:24:27 +02:00
parent 3c4737a145
commit dbb01998ea

View File

@@ -50,7 +50,9 @@ TEST_CASE("init and reset termios") {
static char getch_(int echo) {
char ch;
initTermios(echo);
(void)read(STDIN_FILENO, &ch, 1);
if (read(STDIN_FILENO, &ch, 1) < 0) {
// ignore, not much we can do
}
resetTermios();
return ch;
}