X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/fdca70eebfb07306ea5f57fa6787e86f913416d2..3c03f5572c03f41c268ec045bbd4a4d39afb80b1:/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); }