mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-21 08:34:15 -06:00
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:
parent
a4ea79122d
commit
3109fc5cc4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user