Skip to content

Commit dc28bfb

Browse files
authored
Update main.cpp
1 parent 9e24a53 commit dc28bfb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

x64/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ int main()
8585
std::cout << skCrypt("\n Enter password: ");
8686
std::cin >> password;
8787
std::cout << skCrypt("\n Enter 2fa code if applicable: ");
88-
std::cin >> TfaCode;
88+
std::cin.ignore(); // Ignore the newline character left by the previous input
89+
std::getline(std::cin, TfaCode); // Allow empty input for 2FA code
90+
if (TfaCode.empty()) {
91+
std::cout << skCrypt("\n No 2fa code entered, continuing without it\n");
92+
}
8993
KeyAuthApp.login(username, password, TfaCode);
9094
break;
9195
case 2:

0 commit comments

Comments
 (0)