Commit 3c5554fa authored by Drew's avatar Drew

Fix arm32 bug

parent e6cf7afa
Pipeline #2552 passed with stages
in 7 minutes and 3 seconds
......@@ -60,11 +60,13 @@ public class CarolineCoreEngine : CarolineEngine {
}
print("-----------------------")
#if !swift(>=3.0) || os(Linux)
#if os(Linux)
srand(UInt32(time(nil)))
let rand_int = rand()
#else
let rand_int = arc4random()
let rand_int = Int(rand())
#elseif arch(arm) //32-bit platforms
let rand_int = Int(arc4random() % UInt32(Int32.max))
#else //64-bit platforms
let rand_int = Int(arc4random())
#endif
if failures == 0 {
print(passSnark[Int(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