diff --git a/eth/main.cpp b/eth/main.cpp index a57928e72..9b9c58d17 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -693,15 +693,16 @@ int main(int argc, char** argv) } if (keyManager.exists()) - while (masterPassword.empty()) - { - masterPassword = getPassword("Please enter your MASTER password: "); - if (!keyManager.load(masterPassword)) + { + if (masterPassword.empty() || !keyManager.load(masterPassword)) + while (true) { + masterPassword = getPassword("Please enter your MASTER password: "); + if (keyManager.load(masterPassword)) + break; cout << "Password invalid. Try again." << endl; - masterPassword.clear(); } - } + } else { while (masterPassword.empty())