Skip to content

Commit 2a63299

Browse files
committed
test(): fix function call
1 parent 75f2699 commit 2a63299

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SoObjects/SOGo/SOGoOpenIdSession.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,12 @@ -(NSString *) _random_state
445445
int i = 0;
446446

447447
for (i; i<10; i++) {
448-
[randomState appendFormat: @"%C", [letters characterAtIndex: arc4random_uniform([letters length])]];
448+
int r = 0;
449+
if (arc4random_uniform != NULL)
450+
r = arc4random_uniform([letters length]);
451+
else
452+
r = (arc4random() % [letters length]);
453+
[randomState appendFormat: @"%C", [letters characterAtIndex: r]];
449454
}
450455

451456
return randomState;

0 commit comments

Comments
 (0)