diff --git a/contracts/Raffles.cdc b/contracts/Raffles.cdc index 39183e4..d47cce3 100644 --- a/contracts/Raffles.cdc +++ b/contracts/Raffles.cdc @@ -78,7 +78,7 @@ pub contract Raffles { pub fun draw(): Int { let r = revertibleRandom() - return Int(UInt64(self.addresses.length) % r) + return Int(r % UInt64(self.addresses.length)) } pub fun getEntryAt(index: Int): AnyStruct {