From 14d030093e599b342acf0e0450bf29c6268d21d7 Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 9 Oct 2018 21:08:30 +0300 Subject: Fix bug with parser --- src/actionparser.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/actionparser.c') diff --git a/src/actionparser.c b/src/actionparser.c index be96bb3..f348ff6 100644 --- a/src/actionparser.c +++ b/src/actionparser.c @@ -378,21 +378,21 @@ int parse_action(int argc, char* argv[], UserOpt *opt) { /* handle version info */ if (version()) { - return 1; + return -1; } /* set verbose level */ verbose(); /* figure what is the config file */ if (get_config(opt)) { - return 1; + return -1; } /* If the remaining arguments are < 2 * print help and exit */ - /* if (optNum - pos < 2) { */ - /* print_parser_help(); */ - /* return -1; */ - /* } */ + if (optNum - pos < 1) { + print_parser_help(); + return -1; + } /* find the action */ determine_action(opt); -- cgit v1.2.3