nsxiv45db288
Fixed filenames in parse_options()
+3 −3
1 file changed
- M options.c +3 −3
| @@ -40,9 +40,6 @@ void print_version() { | |||
| 40 | 40 | void parse_options(int argc, char **argv) { | |
| 41 | 41 | int opt; | |
| 42 | 42 | ||
| 43 | − | _options.filenames = (const char**) argv + 1; | |
| 44 | − | _options.filecnt = argc - 1; | |
| 45 | − | ||
| 46 | 43 | while ((opt = getopt(argc, argv, "hv")) != -1) { | |
| 47 | 44 | switch (opt) { | |
| 48 | 45 | case '?': | |
| @@ -56,4 +53,7 @@ void parse_options(int argc, char **argv) { | |||
| 56 | 53 | exit(0); | |
| 57 | 54 | } | |
| 58 | 55 | } | |
| 56 | + | ||
| 57 | + | _options.filenames = (const char**) argv + optind; | |
| 58 | + | _options.filecnt = argc - optind; | |
| 59 | 59 | } | |