diff options
-rw-r--r-- | usr.bin/jot/jot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index 04c6d65..9314a7e 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -275,7 +275,7 @@ main(int argc, char **argv) if (randomize) { *x = (ender - begin) * (ender > begin ? 1 : -1); for (*i = 1; *i <= reps || infinity; (*i)++) { - *y = arc4random() / (double)UINT32_MAX; + *y = arc4random() / ((double)UINT32_MAX + 1); if (putdata(*y * *x + begin, reps - *i)) errx(1, "range error in conversion"); } |