summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-10-21 19:48:35 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2018-10-21 19:48:35 +0300
commit0ede8b64ca5ba1d1fd75f7db0310451c816c45d2 (patch)
tree100c85d613fcdd70b91e43d2ab858b26e5ee76a3 /src
parent840d92358e311b405475ba7488ec55cc3f4f5fae (diff)
Make bintrim accept hexdecimal format too
Diffstat (limited to 'src')
-rw-r--r--src/bintrim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bintrim.c b/src/bintrim.c
index 2a2018e..4cc1a79 100644
--- a/src/bintrim.c
+++ b/src/bintrim.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
+#include <util.h>
#include <err.h>
int
@@ -10,7 +11,7 @@ main(int argc, const char *argv[])
unsigned char trim = 0;
if (argc > 1)
- trim = strtoul(argv[1], NULL, 10);
+ trim = hexdecstrtoull(argv[1], NULL);
bool leading = true;
size_t rd, out_sz = 0, out_allocated = 0;