Skip to content

Commit

Permalink
Do not show empty password recovery checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kimci86 committed Jan 22, 2024
1 parent 94f5d59 commit d20c25a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,19 @@ try
else if(state == Progress::State::EarlyExit)
std::cout << "Found a solution. Stopping." << std::endl;

const auto flagsBefore = std::cout.setf(std::ios::hex, std::ios::basefield);
const auto fillBefore = std::cout.fill('0');
if(!restart.empty())
{
const auto flagsBefore = std::cout.setf(std::ios::hex, std::ios::basefield);
const auto fillBefore = std::cout.fill('0');

std::cout << "You may resume the password recovery with the option: --continue-recovery ";
for(byte c : restart)
std::cout << std::setw(2) << static_cast<int>(c);
std::cout << std::endl;
std::cout << "You may resume the password recovery with the option: --continue-recovery ";
for(byte c : restart)
std::cout << std::setw(2) << static_cast<int>(c);
std::cout << std::endl;

std::cout.fill(fillBefore);
std::cout.flags(flagsBefore);
std::cout.fill(fillBefore);
std::cout.flags(flagsBefore);
}
}

std::cout << "[" << put_time << "] ";
Expand Down

0 comments on commit d20c25a

Please sign in to comment.