fix fuzzing loop returning nothing

This commit is contained in:
Alwin Berger 2024-05-03 13:28:49 +02:00
parent d93ed809f1
commit 3453d02b1d

View File

@ -303,6 +303,10 @@ where
// But as the state may grow to a few megabytes, // But as the state may grow to a few megabytes,
// for now we won' and the user has to do it (unless we find a way to do this on `Drop`). // for now we won' and the user has to do it (unless we find a way to do this on `Drop`).
if let None = ret {
eprintln!("Warning: fuzzing loop ended with no last element");
ret = Some(crate::corpus::CorpusId(0));
}
Ok(ret.unwrap()) Ok(ret.unwrap())
} }
} }