Skip to content

Commit

Permalink
Reseting optind before parsing PROGRESS_ARGS (related to issue #69 an…
Browse files Browse the repository at this point in the history
…d probably #68)
  • Loading branch information
Xfennec committed Jan 22, 2016
1 parent ba3bec9 commit 5d8db0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,13 @@ int c,i;
int option_index = 0;
char *rp;

printf("argc=%d\n", argc);
for (i = 0 ; i < argc ; i++)
printf("[%s] ", argv[i]);
printf("\n\n");

optind = 1; // reset getopt

while(1) {
c = getopt_long (argc, argv, options_string, long_options, &option_index);

Expand Down
2 changes: 1 addition & 1 deletion progress.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "hlist.h"

#define PROGRESS_VERSION "0.10"
#define PROGRESS_VERSION "0.11"

#define PROC_PATH "/proc"
#define MAX_PIDS 32
Expand Down

0 comments on commit 5d8db0f

Please sign in to comment.