fix one off error in fudge library
This commit is contained in:
parent
0e31b8fc1e
commit
fbd37c90a4
@ -194,7 +194,7 @@ bool dice_get(dice_t d, dice_option_t opt, ...)
|
|||||||
static int dice_roll_fudge(void)
|
static int dice_roll_fudge(void)
|
||||||
{
|
{
|
||||||
static int results[6] = {-1, -1, 0, 0, +1, +1};
|
static int results[6] = {-1, -1, 0, 0, +1, +1};
|
||||||
int idx = arc4random_uniform(sizeof(results)/sizeof(int)) + 1;
|
int idx = arc4random_uniform(sizeof(results)/sizeof(int));
|
||||||
return results[idx];
|
return results[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user