mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:23:34 +03:00
parent
1753de9d7a
commit
0417d323c9
52 changed files with 490 additions and 543 deletions
|
|
@ -98,17 +98,16 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||
buffer[i] = '\0';
|
||||
break;
|
||||
}
|
||||
else
|
||||
if(buffer[i] == '\b')
|
||||
/* remove this letter and if this is not the first key, remove the
|
||||
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);
|
||||
i = i - (i >= 1 ? 2 : 1);
|
||||
}
|
||||
/* since echo is disabled, print a newline */
|
||||
fputs("\n", tool_stderr);
|
||||
/* if user did not hit ENTER, terminate buffer */
|
||||
if(i == buflen)
|
||||
buffer[buflen-1] = '\0';
|
||||
buffer[buflen - 1] = '\0';
|
||||
|
||||
return buffer; /* we always return success */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue