diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ykfde.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ykfde.c b/bin/ykfde.c index cc69636..56e2e0c 100644 --- a/bin/ykfde.c +++ b/bin/ykfde.c @@ -69,10 +69,10 @@ char * ask_secret(const char * text) { /* get terminal properties */ if (tcgetattr(STDIN_FILENO, &tp) < 0) { onTerminal = false; + } else { tp_save = tp; } - /* disable echo on terminal */ if (onTerminal) { tp.c_lflag &= ~ECHO; @@ -92,7 +92,7 @@ char * ask_secret(const char * text) { /* restore terminal */ if (tcsetattr(STDIN_FILENO, TCSANOW, &tp_save) < 0) { - fprintf(stderr, "Failed setting terminal attributes.\n"); + fprintf(stderr, "Failed to restore terminal attributes.\n"); free(factor); return NULL; } |