Browse Source

Check getch() against ERR

master
sin 10 years ago
parent
commit
ce599b8e6b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      noice.c

+ 1
- 1
noice.c View File

@@ -359,7 +359,7 @@ readln(void)
getyx(stdscr, y, x); getyx(stdscr, y, x);
x0 = x; x0 = x;


while (c = getch()) {
while ((c = getch()) != ERR) {
if (c == KEY_ENTER || c == '\r') if (c == KEY_ENTER || c == '\r')
break; break;
if (c == KEY_BACKSPACE) { if (c == KEY_BACKSPACE) {


Loading…
Cancel
Save