Merge branch 'master' into pldi13
[c11tester.git] / main.cc
diff --git a/main.cc b/main.cc
index 8a17a18..e8d4f9a 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -75,8 +75,10 @@ static void parse_options(struct model_params *params, int *argc, char ***argv)
                        break;
                }
        }
                        break;
                }
        }
-       (*argc) -= optind;
-       (*argv) += optind;
+       (*argv)[optind - 1] = (*argv)[0];
+       (*argc) -= (optind - 1);
+       (*argv) += (optind - 1);
+       optind = 1;
 
        if (error)
                print_usage(params);
 
        if (error)
                print_usage(params);