aboutsummaryrefslogtreecommitdiff
path: root/src/io/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/cli.c')
-rw-r--r--src/io/cli.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/io/cli.c b/src/io/cli.c
index cc2f156..ae27d06 100644
--- a/src/io/cli.c
+++ b/src/io/cli.c
@@ -227,6 +227,8 @@ error_t cli_parse(int key, char *arg, struct argp_state *state) {
}
cfg->bits = strtoul(arg, NULL, 10);
+ cfg->hex_digits =
+ 2 * (cfg->bits / 8 + (cfg->bits % 8 != 0 ? 1 : 0));
break;
case ARGP_KEY_END:
// validate all option states here.