From: sin Date: Wed, 22 Oct 2014 15:30:27 +0000 (+0100) Subject: Check getch() against ERR X-Git-Tag: v1.0~92^2~161 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ce599b8e6bf44d089820b5b5558835e57f67db7b;p=nnn.git Check getch() against ERR --- diff --git a/noice.c b/noice.c index 09a63db0..a2599d7e 100644 --- a/noice.c +++ b/noice.c @@ -359,7 +359,7 @@ readln(void) getyx(stdscr, y, x); x0 = x; - while (c = getch()) { + while ((c = getch()) != ERR) { if (c == KEY_ENTER || c == '\r') break; if (c == KEY_BACKSPACE) {