Skip to content

Commit 3109fc5

Browse files
committed
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.
1 parent a4ea791 commit 3109fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/test-core/test-engine-stuff.c

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

0 commit comments

Comments
 (0)