--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Wed Oct 14 02:28:32 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Wed Oct 14 21:25:49 2015 +0200
@@ -62,7 +62,7 @@
[seed release];
// perform as if user clicked on an entry
- NSIndexPath *theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0];
+ NSIndexPath *theIndex = [NSIndexPath indexPathForRow:arc4random_uniform((int)[source count]) inSection:0];
[self tableView:self.tableView didSelectRowAtIndexPath:theIndex];
if (IS_NOT_POWERFUL([HWUtils modelType]) == NO)
[self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
@@ -403,7 +403,6 @@
-(void) viewDidLoad {
[super viewDidLoad];
- srandom(time(NULL));
// initialize some "default" values
self.slider.value = 0.05f;