diff options
Diffstat (limited to 'contrib/bc/src/rand.c')
-rw-r--r-- | contrib/bc/src/rand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/bc/src/rand.c b/contrib/bc/src/rand.c index c762f1f36024..0f9950788f7c 100644 --- a/contrib/bc/src/rand.c +++ b/contrib/bc/src/rand.c @@ -13,7 +13,7 @@ * This code is under the following license: * * Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors - * Copyright (c) 2018-2021 Gavin D. Howard and contributors. + * Copyright (c) 2018-2024 Gavin D. Howard and contributors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -517,8 +517,11 @@ bc_rand_int(BcRNG* r) BcRand bc_rand_bounded(BcRNG* r, BcRand bound) { + BcRand rand; + BcRand threshold; + // Calculate the threshold below which we have to try again. - BcRand rand, threshold = (0 - bound) % bound; + threshold = (0 - bound) % bound; do { |