mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Don't show garbage in password input dialog (patch by vitaliyg)
This commit is contained in:
parent
098e2fb1e2
commit
98eb4ad19f
1 changed files with 7 additions and 10 deletions
|
|
@ -218,17 +218,14 @@ begin
|
|||
end;
|
||||
|
||||
function ShowPasswordDialog(out Password: AnsiString): Boolean;
|
||||
var
|
||||
pcTemp: PAnsiChar;
|
||||
begin
|
||||
Result:= False;
|
||||
GetMem(pcTemp, MAX_PATH);
|
||||
if RequestProc(PluginNumber, RT_Password, nil, nil, pcTemp, MAX_PATH) then
|
||||
begin
|
||||
Password:= pcTemp;
|
||||
Result:= True;
|
||||
end;
|
||||
FreeMem(pcTemp);
|
||||
SetLength(Password, MAX_PATH);
|
||||
Password[1] := #0;
|
||||
Result := RequestProc(PluginNumber, RT_Password, nil, nil, PChar(Password), MAX_PATH);
|
||||
if Result then
|
||||
Password:= PChar(Password) // truncate to #0
|
||||
else
|
||||
Password := '';
|
||||
end;
|
||||
|
||||
function FtpConnect(const ConnectionName: AnsiString; out FtpSend: TFTPSendEx): Boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue