~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add WinHelp topic.
[sgt/puzzles]
/
random.c
diff --git
a/random.c
b/random.c
index
08bc608
..
107649c
100644
(file)
--- 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 = 1
L
<< bits;
divisor = max / limit;
max = limit * divisor;