diff --git a/src/sun_main.c b/src/sun_main.c index 872f117..31dc354 100644 --- a/src/sun_main.c +++ b/src/sun_main.c @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) { /* parse command line arguments */ while (1) { int optidx; - int c = getopt_long(argc, argv, "hvt:d:f:a:o:q:z:", long_options, &optidx); + int c = getopt_long(argc-1, argv+1, "+hvt:d:f:a:o:q:z:", long_options, &optidx); /* detect the end of the options. */ if (c == -1) break;