diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/args.c | 2 | ||||
| -rw-r--r-- | src/main.c | 5 |
2 files changed, 2 insertions, 5 deletions
@@ -118,7 +118,7 @@ int parseargs(int argc, char *args[]) ARGS = (arg *)realloc(ARGS, argscap * sizeof(arg)); } ARGS[ARGC].type = pa->type; - ARGS[ARGC].flag = a; + ARGS[ARGC].flag = pa->flag; ARGS[ARGC].numopt = pa->numopt; ARGS[ARGC].runarg = pa->runarg; ARGS[ARGC].opts = (char **)malloc(pa->numopt * sizeof(char *)); @@ -151,15 +151,12 @@ int main(int argc, char *argv[]) printf("For more help run 'dedit --help'\n"); } - if (argc == 1) + if (argc == 1 || getopt("-h", 0)) { printhelp(); exit(EXIT_SUCCESS); } - if (getopt("-h", 0)) - printhelp(); - arg *demoarg = getarg(0); if (demoarg == NULL) { |
