diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/tests.h | 2 |
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; } |