vfmt for rand/sys

pull/13608/head
Subhomoy Haldar 2022-02-26 12:56:18 +05:30
parent 7aa39cbc5e
commit 7a79e2bb4d
1 changed files with 2 additions and 2 deletions

View File

@ -74,12 +74,12 @@ pub fn (r SysRNG) read(mut buf []byte) {
for bytes_left > 0 {
mut value := u64(C.rand())
for _ in 0 ..rand_bytesize {
for _ in 0 .. sys.rand_bytesize {
buf[index] = byte(value)
value >>= 8
index++
}
bytes_left -= rand_bytesize
bytes_left -= sys.rand_bytesize
}
for bytes_left > 0 {