aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar sin <sin@2f30.org>2014-10-22 16:30:27 +0100
committerGravatar sin <sin@2f30.org>2014-10-22 16:30:27 +0100
commitce599b8e6bf44d089820b5b5558835e57f67db7b (patch)
tree07d27ba46c56a14059f8019a52b104e0488f9d32
parentc6614067e4e47234c6e2602b6c963735135bd7ae (diff)
downloadnnn-ce599b8e6bf44d089820b5b5558835e57f67db7b.tar.gz
Check getch() against ERR
-rw-r--r--noice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/noice.c b/noice.c
index 09a63db..a2599d7 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) {