diff options
author | cornelk <github@codejuggle.dj> | 2023-08-09 08:17:34 +0300 |
---|---|---|
committer | cornelk <github@codejuggle.dj> | 2023-08-09 08:17:34 +0300 |
commit | f20c60102c6231fc6f72f9991511762049f55e73 (patch) | |
tree | dba9edd228282c19ec575fc37b6af765834b3fcd | |
parent | 88546f2f0f223d9b822028f0b1f9ef8bcbd267a9 (diff) |
move zero fill check after argument parsing
-rw-r--r-- | source/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/main.c b/source/main.c index b646b37..8285856 100644 --- a/source/main.c +++ b/source/main.c @@ -160,17 +160,14 @@ parse_opt (int key, char *arg, struct argp_state *state) argp_usage(state); break; case 's': - if (zero_fill==1) break; dump_seg++; if (dump_seg > 2) dump_seg = 2; break; case 'S': - if (zero_fill==1) break; dump_seg = 2; break; case 'z': zero_fill=1; - dump_seg = 0; // disable segment info as zero filling makes it inaccurate case 'i': list_opt = 1; break; @@ -268,6 +265,8 @@ main(int argc, char **argv) /* parse command line */ argp_parse(&argp, argc, argv, 0, 0, 0); + if (zero_fill==1) dump_seg = 0; // disable segment info as zero filling makes it inaccurate + /* search file extension */ char basename[strlen(in_fname)+1]; strcpy(basename, in_fname); |