diff -r 9fd7b8d3cf4d -r 2e80c9861818 project_files/HedgewarsMobile/Classes/VoicesViewController.m --- a/project_files/HedgewarsMobile/Classes/VoicesViewController.m Wed Oct 14 02:28:32 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/VoicesViewController.m Wed Oct 14 21:25:49 2015 +0200 @@ -32,7 +32,6 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - srandom(time(NULL)); voiceBeingPlayed = NULL; @@ -129,7 +128,7 @@ NSString *voiceDir = [[NSString alloc] initWithFormat:@"%@/%@/",VOICES_DIRECTORY(),[voiceArray objectAtIndex:newRow]]; NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:voiceDir error:NULL]; - int index = random() % [array count]; + int index = arc4random_uniform((int)[array count]); voiceBeingPlayed = Mix_LoadWAV([[voiceDir stringByAppendingString:[array objectAtIndex:index]] UTF8String]); [voiceDir release];