From 9e80356dd5f13c32dc265d3a499623134d95beb5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Jan 2004 16:07:40 +0000 Subject: Luck Call made win32 password prompting support backspace --- src/getpass.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/getpass.c b/src/getpass.c index 225f7f04e..77e950c9d 100644 --- a/src/getpass.c +++ b/src/getpass.c @@ -203,6 +203,11 @@ char *getpass_r(const char *prompt, char *buffer, int buflen) buffer[i] = 0; break; } + else + if ( buffer[i] == '\b') + /* remove this letter and if this is not the first key, remove the + previous one as well */ + i = i - (i>=1?2:1); } /* if user didn't hit ENTER, terminate buffer */ if (i==buflen) -- cgit v1.2.3