aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/tests.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/tests.h')
-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;
}