Skip to content

Commit ea9c764

Browse files
authored
fix: do not panic if cannot read counterexample (#12467)
1 parent cc24b6b commit ea9c764

File tree

1 file changed

+1
-1
lines changed
  • crates/evm/evm/src/executors/fuzz

1 file changed

+1
-1
lines changed

crates/evm/evm/src/executors/fuzz/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl FuzzedExecutor {
142142
'stop: while continue_campaign(test_data.runs) {
143143
// If counterexample recorded, replay it first, without incrementing runs.
144144
let input = if let Some(failure) = self.persisted_failure.take()
145-
&& func.selector() == failure.calldata[..4]
145+
&& failure.calldata.get(..4).is_some_and(|selector| func.selector() == selector)
146146
{
147147
failure.calldata.clone()
148148
} else {

0 commit comments

Comments
 (0)