Commit a2042c8a authored by Drew's avatar Drew

Fix random generation even more

parent d44ffafc
Pipeline #2518 passed with stages
in 54 seconds
......@@ -60,12 +60,13 @@ public class CarolineCoreEngine : CarolineEngine {
}
print("-----------------------")
#if !swift(>=2.3) || os(Linux)
srand(UInt32(time(nil)))
let rand_int = Int(rand() % UInt32(Int.max))
#if swift(>=2.3)
let rand_int = Int(arc4random() % 10000000)
#else
let rand_int = Int(arc4random())
srand(UInt32(time(nil)))
let rand_int = Int(rand() % 1000000)
#endif
if failures == 0 {
print(passSnark[rand_int % passSnark.count])
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment