1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-07-04 12:03:41 +02:00

src/main.cpp: make sure we can parse "--l33t" and "--threads" in any order.

This commit is contained in:
Henrik Hautakoski 2020-01-16 17:47:45 +01:00
parent f3bf4bdab1
commit 152015d959

View file

@ -122,10 +122,15 @@ int main(int argc, char **argv) {
} }
if (!strcmp(argv[p], "search")) { if (!strcmp(argv[p], "search")) {
bool parse_opt;
p++; p++;
do {
parse_opt = false;
if (p < argc && !strcmp(argv[p], "--l33t")) { if (p < argc && !strcmp(argv[p], "--l33t")) {
option_l33t = true; option_l33t = true;
parse_opt = true;
p++; p++;
} }
@ -142,7 +147,9 @@ int main(int argc, char **argv) {
<< " thread support. this option is ignored." << std::endl; << " thread support. this option is ignored." << std::endl;
#endif /* HAVE_THREADS */ #endif /* HAVE_THREADS */
p++; p++;
parse_opt = true;
} }
} while(parse_opt && p < argc);
if (argc <= p) { if (argc <= p) {
std::cerr << "You must specify a word list." << std::endl; std::cerr << "You must specify a word list." << std::endl;