diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-01-13 16:07:40 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-01-13 16:07:40 +0000 |
commit | 9e80356dd5f13c32dc265d3a499623134d95beb5 (patch) | |
tree | c9efefeb8b4d6646c392d678f65c89f291609528 /src | |
parent | 4a4295290dcd31e8c1dc16cf30d71400d06e5595 (diff) |
Luck Call made win32 password prompting support backspace
Diffstat (limited to 'src')
-rw-r--r-- | src/getpass.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |