Minor change

This commit is contained in:
Oleg Kalachev
2026-08-28 19:30:11 +03:00
parent cc49718a60
commit 23bac0cb31
+1 -1
View File
@@ -140,7 +140,7 @@ public:
// to implement for Windows, see https://stackoverflow.com/a/71992965/6850197
if (!isatty(STDIN_FILENO)) return 0;
struct pollfd pfd = { .fd = STDIN_FILENO, .events = POLLIN };
return poll(&pfd, 1, 0) > 0;
return poll(&pfd, 1, 0) > 0 && (pfd.revents & POLLIN);
}
int read() {