Merge pull request #2749

f732e723 Disguise password length in prompt (Leon Klingele)
This commit is contained in:
Riccardo Spagni 2017-11-14 15:35:47 +02:00
commit a2b427b1bf
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -88,13 +88,11 @@ namespace
{
pass.back() = '\0';
pass.resize(pass.size() - 1);
std::cout << "\b \b";
}
}
else
{
pass.push_back(ch);
std::cout << '*';
}
}
@ -150,13 +148,11 @@ namespace
{
aPass.back() = '\0';
aPass.resize(aPass.size() - 1);
std::cout << "\b \b";
}
}
else
{
aPass.push_back(ch);
std::cout << '*';
}
}