src/bin: minor, fix warning from Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-08-04 07:58:47 +02:00
parent 867ea6e92a
commit 9aacd251b8
+5 -2
View File
@@ -14,7 +14,7 @@
static char rawgetch(void)
{
struct termios saved, c;
char key;
int key;
if (tcgetattr(fileno(stdin), &saved) < 0)
return -1;
@@ -33,7 +33,10 @@ static char rawgetch(void)
key = getchar();
tcsetattr(fileno(stdin), TCSANOW, &saved);
return key;
if (key == EOF)
return -1;
return (char)key;
}
int yorn(const char *fmt, ...)