From b3adcbe42bfcd5330748d599c88aca77b942dae4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Sep 2008 10:39:01 +0200 Subject: screen_utils: hide cursor after screen_read_password() The call to curs_set(0) in screen_read_password() was dead code, because it was after the function return. Repair that. --- src/screen_utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/screen_utils.c b/src/screen_utils.c index c6bfb543c..5e534a12e 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -100,6 +100,8 @@ screen_getstr(WINDOW *w, const char *prompt) static char * screen_read_password(WINDOW *w, const char *prompt) { + char *ret; + if (w == NULL) { int rows, cols; getmaxyx(stdscr, rows, cols); @@ -114,11 +116,12 @@ screen_read_password(WINDOW *w, const char *prompt) colors_use(w, COLOR_STATUS_ALERT); if (prompt == NULL) - return wreadln_masked(w, _("Password: "), NULL, COLS, NULL, NULL); + ret = wreadln_masked(w, _("Password: "), NULL, COLS, NULL, NULL); else - return wreadln_masked(w, prompt, NULL, COLS, NULL, NULL); + ret = wreadln_masked(w, prompt, NULL, COLS, NULL, NULL); curs_set(0); + return ret; } static gint -- cgit v1.2.3