aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-10-15 13:47:27 +0200
committerRiccardo Spagni <ric@spagni.net>2018-10-15 13:47:27 +0200
commit3c36a6a227f0e2164dda0ca0fef47b4c9f83e1aa (patch)
treecf572b0b3fba2cbeaa41f5ee48592539570a5b41
parentMerge pull request #4544 (diff)
parentpassword: fix backspace outputting ^? on linux on echoing secure input (diff)
downloadmonero-3c36a6a227f0e2164dda0ca0fef47b4c9f83e1aa.tar.xz
Merge pull request #4588
b215ea9f password: fix backspace outputting ^? on linux on echoing secure input (moneromooo-monero)
-rw-r--r--src/common/password.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/password.cpp b/src/common/password.cpp
index a8d5141dc..e41c75088 100644
--- a/src/common/password.cpp
+++ b/src/common/password.cpp
@@ -158,6 +158,13 @@ namespace
if (!aPass.empty())
{
aPass.pop_back();
+ if (!hide_input)
+ std::cout << "\b\b\b \b\b\b" << std::flush;
+ }
+ else
+ {
+ if (!hide_input)
+ std::cout << "\b\b \b\b" << std::flush;
}
}
else