aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-17 13:44:54 -0500
committerJack Lloyd <[email protected]>2016-11-17 13:44:54 -0500
commit97df0c27b878d77799353ccc9eda9705b1ec1fa4 (patch)
tree017008c5ef5fd4d6822bad37b67ecce91adf9ba7
parent2566610bc2a29035faef5b884caba8a3a049313b (diff)
This range check was in the wrong direction
-rw-r--r--src/tests/tests.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/tests.h b/src/tests/tests.h
index fe5760c2b..236a89d6f 100644
--- a/src/tests/tests.h
+++ b/src/tests/tests.h
@@ -348,7 +348,7 @@ class Test
if(r.size() > min_offset)
{
- const size_t offset = std::min<size_t>(min_offset, rng.next_byte() % r.size());
+ const size_t offset = std::max<size_t>(min_offset, rng.next_byte() % r.size());
const byte perturb = rng.next_nonzero_byte();
r[offset] ^= perturb;
}