From 8d378c9c9d43eac5bf840b26e86db8387beb27bf Mon Sep 17 00:00:00 2001 From: Matthew Sterrett Date: Fri, 4 Oct 2024 14:56:57 -0700 Subject: [PATCH] Fix indexing problem --- utils/rand_array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/rand_array.h b/utils/rand_array.h index 74de2548..dccbacdf 100644 --- a/utils/rand_array.h +++ b/utils/rand_array.h @@ -136,7 +136,7 @@ static std::vector get_array(std::string arrtype, else { val = std::numeric_limits::max(); } - for (size_t ii = 1; ii <= arrsize; ++ii) { + for (size_t ii = 0; ii < arrsize; ++ii) { if (rand() & 0x1) { arr[ii] = val; } } }