Use convert()

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-06-07 01:11:56 +02:00
1 parent 2aa805fa52
commit 7f2a3c76e4
1 file changed
+1 -1
@@ -31,7 +31,7 @@ actual object SRNG {
actual fun getRandomBytes(amount: Int): UByteArray { actual fun getRandomBytes(amount: Int): UByteArray {
memScoped { memScoped {
val array = allocArray<UByteVar>(amount) val array = allocArray<UByteVar>(amount)
randombytes_buf(array, amount.toULong()) randombytes_buf(array, amount.convert())
return UByteArray(amount) { return UByteArray(amount) {
array[it] array[it]
} }