Check getch() against ERR

This commit is contained in:
sin 2014-10-22 16:30:27 +01:00
parent c6614067e4
commit ce599b8e6b
1 changed files with 1 additions and 1 deletions

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