Skip to content
Snippets Groups Projects
Commit 2a536226 authored by Andreas Gattringer's avatar Andreas Gattringer
Browse files

fixed command line argument parsing bug

parent 16f908bd
Branches
Tags 1.0.1
No related merge requests found
......@@ -289,8 +289,8 @@ struct program_options check_cats_main_arguments(int argc, char **argv)
exit_cats(EXIT_FAILURE);
}
assert(optind < argc);
if (options.configuration_file == NULL && options.need_conf == true) {
assert(argc < 2 || optind < argc);
if (argc > 1 && options.configuration_file == NULL && options.need_conf == true) {
options.configuration_file = strdup(argv[optind]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment