Skip to content

Commit

Permalink
Analyzer fix for fallthrough switch cases
Browse files Browse the repository at this point in the history
Fixes #23
  • Loading branch information
encounter committed Jan 7, 2024
1 parent ee3b297 commit 59fe806
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/analysis/slices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ impl FunctionSlices {
StepResult::Continue | StepResult::LoadStore { .. } => {
let next_address = ins_addr + 4;
// If we already visited the next address, connect the blocks and end
if executor.visited(section.address as u32, next_address) {
if executor.visited(section.address as u32, next_address)
|| self.blocks.contains_key(&next_address)
{
self.blocks.insert(block_start, Some(next_address));
self.branches.insert(ins_addr, vec![next_address]);
Ok(ExecCbResult::EndBlock)
Expand Down

0 comments on commit 59fe806

Please sign in to comment.