mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 16:25:35 +00:00
fix ignored return value in getch_
This commit is contained in:
parent
3c4737a145
commit
dbb01998ea
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user