Reduce the gate on get_random_gnc_numeric.

Fixing Bug 779217 increased the maximum denominator by 10, and that led
to overflows when converting large numbers' denominators from 100 to the
new max.
This commit is contained in:
John Ralls 2017-03-25 17:15:37 -07:00
parent a4ea79122d
commit 3109fc5cc4

View File

@ -474,7 +474,7 @@ get_random_gnc_numeric(void)
* The loop is to "make sure" we get there. We might
* want to make this dependent on "deno" in the future.
*/
numer = get_random_gint64 () % (2ULL << 44);
numer = get_random_gint64 () % (2ULL << 40);
if (0 == numer) numer = 1;
/* Make sure we have a non-zero denominator */
if (0 == deno) deno = 1;