aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/actionparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/actionparser.c b/src/actionparser.c
index 10882b3..c8c70db 100644
--- a/src/actionparser.c
+++ b/src/actionparser.c
@@ -232,15 +232,15 @@ int get_config(UserOpt *opt) {
return 0;
}
}
- }
+ // rewind
+ pos = pos - 1;
+ token = opts[pos];
+ }
char * defaultConf = ".ck";
char * home = getenv("HOME");
opt->confDir = malloc(strlen(defaultConf) + 1 /* '/' */ + strlen(home) + 1);
str_join_dirname_with_basename(opt->confDir, home, defaultConf);
- // rewind
- pos = pos - 1;
- token = opts[pos];
return 0;
}
@@ -382,7 +382,7 @@ int parse_action(int argc, char* argv[], UserOpt *opt) {
return -1;
}
- /* If the remaining arguments are < 2
+ /* If the remaining arguments are < 1
* print help and exit */
if (optNum - pos < 1) {
print_parser_help();