From c9d38a251c2294e069c5e9a9a35f2fb0979f8a59 Mon Sep 17 00:00:00 2001 From: niknah Date: Fri, 15 Mar 2024 09:21:30 +1100 Subject: [PATCH] Move escape so it clears the password instead of returning a bad password --- helpers/auth_x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/auth_x11.c b/helpers/auth_x11.c index 58a1913..17e0c29 100644 --- a/helpers/auth_x11.c +++ b/helpers/auth_x11.c @@ -1287,6 +1287,7 @@ int Prompt(const char *msg, char **response, int echo) { &priv.last_keystroke); break; } + case '\033': // Escape. case '\001': // Ctrl-A. // Clearing input line on just Ctrl-A is odd - but commonly // requested. In most toolkits, Ctrl-A does not immediately erase but @@ -1307,7 +1308,6 @@ int Prompt(const char *msg, char **response, int echo) { &priv.last_keystroke); break; case 0: // Shouldn't happen. - case '\033': // Escape. done = 1; break; case '\r': // Return.