diff options
| author | Mason Reed <mason@vector35.com> | 2025-02-02 22:10:32 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-02-02 22:10:32 -0500 |
| commit | 07dec2953456f5a6bee6100498eeebdfcb1964a7 (patch) | |
| tree | a28c2484ed51ee763863cb990fde5e92302c6aea /rust/src/render_layer.rs | |
| parent | 160ae4eb48377f487ac31312a03c92fc26cc272d (diff) | |
Fix Rust apply_to_linear_object logic applying non basic block backed disasm lines
Diffstat (limited to 'rust/src/render_layer.rs')
| -rw-r--r-- | rust/src/render_layer.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rust/src/render_layer.rs b/rust/src/render_layer.rs index 27d5e531..80ecc639 100644 --- a/rust/src/render_layer.rs +++ b/rust/src/render_layer.rs @@ -161,10 +161,9 @@ pub trait RenderLayer: Sized { Some((probe_line.ty, probe_line.basic_block.to_owned(), line_block)) }) .flat_map(|(line_ty, basic_block, lines)| { - match line_ty { - LinearDisassemblyLineType::CodeDisassemblyLineType => { + match (basic_block, line_ty) { + (Some(block), LinearDisassemblyLineType::CodeDisassemblyLineType) => { // Dealing with code lines. - let block = basic_block.expect("Code line has no basic block"); let function = block.function(); let text_lines = lines.into_iter().map(|line| line.contents).collect(); let new_text_lines = self.apply_to_block(&block, text_lines); |
