--- a/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Wed Oct 14 02:28:32 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Wed Oct 14 21:25:49 2015 +0200
@@ -54,7 +54,7 @@
}
-(void) viewWillAppear:(BOOL)animated {
- NSIndexPath *indexPath = [NSIndexPath indexPathForRow:random()%[self.listOfMissions count] inSection:0];
+ NSIndexPath *indexPath = [NSIndexPath indexPathForRow:arc4random_uniform((int)[self.listOfMissions count]) inSection:0];
[self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
[self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
[super viewWillAppear:animated];