Skip to content

Commit

Permalink
Merge pull request #83 from merkys/fix-getopt-on-arm
Browse files Browse the repository at this point in the history
Fix command line arg parsing on ARM
  • Loading branch information
mittinatten authored Jun 30, 2022
2 parents b5a8801 + 6184e94 commit e6500e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ static int
parse_arg(int argc, char **argv, struct cli_state *state)
{
int alg_set = 0;
char opt;
int opt;
int n_opt = 'z' + 1;
char opt_set['z' + 1];
int option_index = 0;
Expand All @@ -540,7 +540,7 @@ parse_arg(int argc, char **argv, struct cli_state *state)

while ((opt = getopt_long(argc, argv, options_string,
long_options, &option_index)) != -1) {
opt_set[(int)opt] = 1;
opt_set[opt] = 1;
/* Assume arguments starting with dash are actually missing arguments */
if (optarg != NULL && optarg[0] == '-') {
if (option_index > 0)
Expand Down

0 comments on commit e6500e4

Please sign in to comment.