summary refs log tree commit diff homepage
path: root/play.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-10-15 15:55:52 +0000
committerJune McEnroe <june@causal.agency>2021-10-15 15:55:52 +0000
commite206bf6d689cab448f531b74db7cbc7a6cfce9d2 (patch)
treead4e223eea5a25dd6ad802464a1e22ebe6502714 /play.c
parentBuild chroot only on OpenBSD (diff)
downloadplay-e206bf6d689cab448f531b74db7cbc7a6cfce9d2.tar.gz
play-e206bf6d689cab448f531b74db7cbc7a6cfce9d2.zip
Retry getch() after ERR
In the version of ncurses in OpenBSD, the SIGWINCH handler installed
by enabling keypad causes the read() inside getch() to fail with
EINTR, which getch() doesn't handle, itself returning ERR.
Diffstat (limited to 'play.c')
-rw-r--r--play.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/play.c b/play.c
index 1e1ab51..ca3ac4f 100644
--- a/play.c
+++ b/play.c
@@ -249,6 +249,7 @@ static const struct Game *menu(void) {
 		clrtoeol();
 		move(1 + 3 * game, 2);
 		int ch = getch();
+		if (ch == ERR) ch = getch();
 		switch (ch) {
 			break; case 'k': case KEY_UP: {
 				if (game) game--;
ject'>Add export optionJune McEnroe Adding the export query parameter to any page downloads a .html with the default stylesheet embedded, and all navigation, forms and internal links removed, for being able to share some part of a private instance of litterbox. 2020-07-17Add margin to inputsJune McEnroe Seems that only Safari provides any margins on form elements by default. 2020-07-16Don't write null terminator in stylesheet responseJune McEnroe 2020-07-16Remove sudo from make installJune McEnroe