Skip to content

Commit

Permalink
(fix) Incorrect return
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Dec 4, 2024
1 parent bb9704f commit 6b312df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cover/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl InputCoverage {
seq_macro::seq!(cov_id in 0_u64 .. 1_000_u64 {
if black_box(flat.contains(&cov_id)) {
let cov = black_box(cov_id.saturating_add(1));
println!("C:{cov}");
print!("(DEBUG)-cov:{cov}");
}
});
}
Expand Down
7 changes: 4 additions & 3 deletions src/fuzzer/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ pub fn try_parse_input(bytes: &[u8], manager: CampaignManager) -> Option<OneInpu
let arc = manager.transcoder();
let guard = arc.try_lock().expect("Failed on `try_lock`");

let msg_len = input.messages.len();
for payload in data {
let origin = match input.fuzz_option {
EnableOriginFuzzing => Origin(payload[4]),
Expand All @@ -237,7 +236,9 @@ pub fn try_parse_input(bytes: &[u8], manager: CampaignManager) -> Option<OneInpu

match decode_contract_message(&guard, &mut encoded_cloned) {
Ok(message_metadata) => {
if data.max_messages_per_exec != 0 && msg_len <= data.max_messages_per_exec {
if data.max_messages_per_exec != 0
&& input.messages.len() <= data.max_messages_per_exec
{
let is_payable: bool = db.is_payable(&slctr);
let mut value_token: u128 = 0;
if is_payable {
Expand All @@ -259,7 +260,7 @@ pub fn try_parse_input(bytes: &[u8], manager: CampaignManager) -> Option<OneInpu
}
}

if msg_len > 0 {
if !input.messages.is_empty() {
return Some(input);
}
None
Expand Down

0 comments on commit 6b312df

Please sign in to comment.