X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/522ed78193ce3bb0e5b88f96ac7d2ec4c6c6e2a5..ab53eb64790d5bee44525c3a50a420a6816e2495:/random.c?ds=sidebyside diff --git a/random.c b/random.c index 08bc608..107649c 100644 --- a/random.c +++ b/random.c @@ -264,7 +264,7 @@ unsigned long random_upto(random_state *state, unsigned long limit) bits += 3; assert(bits < 32); - max = 1 << bits; + max = 1L << bits; divisor = max / limit; max = limit * divisor;