From e13779455585313cf9975b42bd422fb2eb4b7e1d Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 28 Dec 2018 12:30:57 +0100 Subject: [PATCH] Fix random_number() and -m 12 contraints --- tools/test.pl | 2 +- tools/test_modules/m00012.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test.pl b/tools/test.pl index 2e8ffd991..84164a5e9 100755 --- a/tools/test.pl +++ b/tools/test.pl @@ -406,7 +406,7 @@ sub random_number return if $min > $max; - return int ((rand ($max - $min)) + $min); + return int ((rand (($max + 1) - $min)) + $min); } sub random_bytes diff --git a/tools/test_modules/m00012.pm b/tools/test_modules/m00012.pm index 23261eaf0..816667e94 100644 --- a/tools/test_modules/m00012.pm +++ b/tools/test_modules/m00012.pm @@ -10,7 +10,7 @@ use warnings; use Digest::MD5 qw (md5_hex); -sub module_constraints { [[0, 256], [0, 256], [0, 55], [0, 55], [0, 55]] } +sub module_constraints { [[0, 256], [0, 32], [0, 55], [0, 32], [0, 55]] } sub module_generate_hash {