Krolyxon
Commit 45db288

Branches

Refs →

nsxiv45db288

Fixed filenames in parse_options()

Author
Bert
Date
2011-01-20 16:03 +0100
Parent
c399c1a
Commit
45db2881e26dd5e51c0e4142bdefa2d947292c80

+3 −3

1 file changed

  1. M options.c +3 −3
M options.c View
@@ -40,9 +40,6 @@ void print_version() {
4040 void parse_options(int argc, char **argv) {
4141 int opt;
4242
43− _options.filenames = (const char**) argv + 1;
44− _options.filecnt = argc - 1;
45−
4643 while ((opt = getopt(argc, argv, "hv")) != -1) {
4744 switch (opt) {
4845 case '?':
@@ -56,4 +53,7 @@ void parse_options(int argc, char **argv) {
5653 exit(0);
5754 }
5855 }
56+
57+ _options.filenames = (const char**) argv + optind;
58+ _options.filecnt = argc - optind;
5959 }