From 2d00e4bf8b63bbe1c4442cd7f765ef8782f5ac6c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 29 Jan 2019 15:21:39 +0100 Subject: relax_test: allow running just one iteration --- relax_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'relax_test.c') diff --git a/relax_test.c b/relax_test.c index d211e35..c635949 100644 --- a/relax_test.c +++ b/relax_test.c @@ -61,7 +61,7 @@ int main(int argc, char **argv) } log2N = strtol(argv[1], NULL, 0); log2maxiter = strtol(argv[2], NULL, 0); - if (log2N <= 0 || log2maxiter <= 0 || + if (log2N <= 0 || log2maxiter < 0 || log2N >= sizeof(N) * 8 || log2maxiter >= sizeof(maxiter) * 8) { fprintf(stderr, "Invalid log2N/log2maxiter values: %ld/%ld\n", log2N, log2maxiter); -- cgit v1.2.3