Check getch() against ERR

This commit is contained in:
sin 2014-10-22 16:30:27 +01:00
parent c6614067e4
commit ce599b8e6b

View file

@ -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) {