Fixed anykey so that it flushs STDIN before waiting for input

This commit is contained in:
bluesaxman 2021-09-10 12:24:57 -06:00
parent db068908d6
commit 41f611c1e6

View File

@ -61,6 +61,7 @@ my @good = ();
# for providing a waiting prompt
sub anykey {
$termios->setattr(fileno(STDIN), TCSAFLUSH);
print shift;
return getc(STDIN);
}