1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 14:48:12 +00:00

Reset optind and optopt for second getopt loop

This commit is contained in:
jsteube 2017-03-19 15:27:43 +01:00
parent 378f852cec
commit 9558fcc012

View File

@ -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)