From 3109fc5cc4a834016910a0a531c0cd58088dca5a Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 25 Mar 2017 17:15:37 -0700 Subject: [PATCH] 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. --- src/engine/test-core/test-engine-stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/test-core/test-engine-stuff.c b/src/engine/test-core/test-engine-stuff.c index 4516fabb7e1..f050c27e99e 100644 --- a/src/engine/test-core/test-engine-stuff.c +++ b/src/engine/test-core/test-engine-stuff.c @@ -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;