]> Sergey Matveev's repositories - nnn.git/commitdiff
Check getch() against ERR
authorsin <sin@2f30.org>
Wed, 22 Oct 2014 15:30:27 +0000 (16:30 +0100)
committersin <sin@2f30.org>
Wed, 22 Oct 2014 15:30:27 +0000 (16:30 +0100)
noice.c

diff --git a/noice.c b/noice.c
index 09a63db018eff8f7d579a99b64c8c3bcb8561425..a2599d7ea62412a485820ba3d90207daafd2b6e8 100644 (file)
--- 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) {