aboutsummaryrefslogtreecommitdiff
path: root/src/io/cli.c
diff options
context:
space:
mode:
authorJ08nY2017-05-02 16:57:25 +0200
committerJ08nY2017-05-02 16:57:25 +0200
commit2fe84534d7cfa5a2aebd8877222871b54e7c80c5 (patch)
treebcd09c29d471b461290b56558853454dcdc4e80d /src/io/cli.c
parent7f933a25210a8c2a4eef63b94abac887ca8805ee (diff)
downloadecgen-2fe84534d7cfa5a2aebd8877222871b54e7c80c5.tar.gz
ecgen-2fe84534d7cfa5a2aebd8877222871b54e7c80c5.tar.zst
ecgen-2fe84534d7cfa5a2aebd8877222871b54e7c80c5.zip
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.