summaryrefslogtreecommitdiff
path: root/lib/std/rand.myr
diff options
context:
space:
mode:
authorAndrew Chambers <andrewchamberss@gmail.com>2016-01-17 21:42:16 +1300
committerAndrew Chambers <andrewchamberss@gmail.com>2016-01-17 21:42:16 +1300
commit718aeb83bd50ba72b3e1fc2e7cd6b3442e0ed79a (patch)
treeacbe7430a348e8da06f1e9e862fed470132226f3 /lib/std/rand.myr
parent1d4eded8eeec929b5d376c675421ee79a09bf216 (diff)
downloadmc-718aeb83bd50ba72b3e1fc2e7cd6b3442e0ed79a.tar.gz
fix randbytes
Diffstat (limited to 'lib/std/rand.myr')
-rw-r--r--lib/std/rand.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/rand.myr b/lib/std/rand.myr
index 91dd774..3eb17d1 100644
--- a/lib/std/rand.myr
+++ b/lib/std/rand.myr
@@ -183,7 +183,7 @@ const rngrandbytes = {rng, buf
;;
r = rand32(rng)
for ; n != buf.len; n++
- buf[n++] = (r & 0xff) castto(byte)
+ buf[n] = (r & 0xff) castto(byte)
r >>= 8
;;
-> n