aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/options.c b/options.c
index 5b52b66..50f2012 100644
--- a/options.c
+++ b/options.c
@@ -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;
}