From eaf85832a30ac517009eacd69caf2d857003c470 Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 3 Jun 2021 20:38:57 +0100 Subject: [PATCH] eh --- src/bits.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bits.c b/src/bits.c index 6b7a351..c1f698b 100644 --- a/src/bits.c +++ b/src/bits.c @@ -55,7 +55,12 @@ int main(int argc, char **argv) { IGNORE(argc); - const char* mask = argv[1] && Lcheck(argv[1][0] && argv[1][1], "expected 2 character mask") ? argv[1] : "01"; + const char* mask = argv[1] && + Lcheck( argv[1][0] && // We only care about the first 2 chars, so check them both. If neither are the null terminator, then the mask is valid. + argv[1][1], "expected 2 character mask") ? + argv[1] : + "01"; + unsigned char buf[BUFFER_SIZE]; char tbuf[BUFFER_SIZE * 8]; size_t bsz = BUFFER_SIZE;