X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/f03c5a86c8c9b1f03d8ced522597c9a9844002b4..3665689ab79ea1697c58914453f676a180eec689:/lib/random.c diff --git a/lib/random.c b/lib/random.c index 21d0b09..ce87abd 100644 --- a/lib/random.c +++ b/lib/random.c @@ -23,13 +23,11 @@ * */ -#include -#include "types.h" +#include "common.h" #include #include #include -#include #include "random.h" #include "log.h" @@ -83,7 +81,7 @@ char *random_id(void) { char id[128]; random_get(words, sizeof words); - basen(words, 4, id, sizeof id, 62); + basen(words, sizeof words / sizeof *words, id, sizeof id, 62); return xstrdup(id); }