Permalink
Browse files

Fixed filenames in parse_options()

  • Loading branch information...
muennich committed Jan 20, 2011
1 parent c399c1a commit 45db2881e26dd5e51c0e4142bdefa2d947292c80
Showing with 3 additions and 3 deletions.
  1. +3 −3 options.c
View
@@ -40,9 +40,6 @@ void print_version() {
void parse_options(int argc, char **argv) {
int opt;
- _options.filenames = (const char**) argv + 1;
- _options.filecnt = argc - 1;
-
while ((opt = getopt(argc, argv, "hv")) != -1) {
switch (opt) {
case '?':
@@ -56,4 +53,7 @@ void parse_options(int argc, char **argv) {
exit(0);
}
}
+
+ _options.filenames = (const char**) argv + optind;
+ _options.filecnt = argc - optind;
}

0 comments on commit 45db288

Please sign in to comment.