mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 22:58:30 +00:00
Reset optind and optopt for second getopt loop
This commit is contained in:
parent
378f852cec
commit
9558fcc012
@ -281,6 +281,16 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (optopt != 0)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid argument specified");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
optind = 1;
|
||||
optopt = 0;
|
||||
|
||||
option_index = 0;
|
||||
|
||||
while (((c = getopt_long (argc, argv, short_options, long_options, &option_index)) != -1) && optopt == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user