summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/curses/gui-curses-main.c')
-rw-r--r--src/gui/curses/gui-curses-main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index 32e953691..ade0a9878 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -104,8 +104,8 @@ gui_main_get_password (const char **prompt, char *password, int size)
/* enter */
if (ch == '\n')
break;
- /* ctrl-C */
- if (ch == 3)
+ /* terminal lost or ctrl-C */
+ if ((ch == ERR) || (ch == 3))
{
password[0] = 3;
i = 1;