fixed little bug in getopt parsing

This commit is contained in:
Steffen Vogel 2012-12-23 11:40:38 +01:00
parent 32f3b42aac
commit c0bc9b605b

View file

@ -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;