Fix GetRandomSide always returning left GetRandomSide uses `RandomBool` to branch, but in the else block it returns `entry.lhs` again instead of `entry.rhs`. This causes it to completely blind the fuzzer to constants found on the right-hand-side of comparisons. Fix it to correctly use `rhs` when returning the other side. PiperOrigin-RevId: 889588583
diff --git a/fuzztest/internal/table_of_recent_compares.h b/fuzztest/internal/table_of_recent_compares.h index 742bf55..2f61289 100644 --- a/fuzztest/internal/table_of_recent_compares.h +++ b/fuzztest/internal/table_of_recent_compares.h
@@ -196,7 +196,7 @@ result = val; } } else { - ValueType val = static_cast<ValueType>(entry.lhs); + ValueType val = static_cast<ValueType>(entry.rhs); if (min <= val && val <= max) { result = val; }