Skip to content

Commit

Permalink
fix bitvec fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Jan 17, 2023
1 parent 4ff6f5a commit c3b95e7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions fuzz/bitvec_verification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,14 @@ struct test_set {
break;

case SET: {
auto const index = std::min({ref1.size() - 1U, ref2.size() - 1U, num});
ref1[index] = value;
ref2[index] = value;
uut1.set(index, value);
uut2.set(index, value);
if (!ref1.empty()) {
auto const index =
std::min({ref1.size() - 1U, ref2.size() - 1U, num});
ref1[index] = value;
ref2[index] = value;
uut1.set(index, value);
uut2.set(index, value);
}
break;
}

Expand Down

0 comments on commit c3b95e7

Please sign in to comment.