Skip to content

Commit 6245591

Browse files
committed
Fix hex dump lines not having highlighting when a python layer is used
1 parent 1890124 commit 6245591

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

python/function.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3429,6 +3429,8 @@ def _to_core_struct(self) -> core.BNDisassemblyTextLine:
34293429
result.addr = self.address
34303430
if self.il_instruction is not None:
34313431
result.instrIndex = self.il_instruction.instr_index
3432+
else:
3433+
result.instrIndex = 0xffffffffffffffff
34323434
result.tokens = InstructionTextToken._get_core_struct(self.tokens)
34333435
result.count = len(self.tokens)
34343436
result.highlight = self.highlight._to_core_struct()

python/renderlayer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,7 @@ def apply_to_linear_view_object(
336336
"HLIL SSA Function Body",
337337
"Language Representation Function Body"
338338
]:
339-
self.apply_to_high_level_il_body(lines[0].function, lines)
340-
return lines
339+
return self.apply_to_high_level_il_body(lines[0].function, lines)
341340

342341
block_lines = []
343342
final_lines = []
@@ -396,7 +395,7 @@ def process_misc():
396395
process_disasm()
397396
block_lines = new_block_lines
398397
else:
399-
self.apply_to_misc_linear_lines(obj, prev, next, block_lines)
398+
block_lines = self.apply_to_misc_linear_lines(obj, prev, next, block_lines)
400399
final_lines += block_lines
401400
block_lines = []
402401

0 commit comments

Comments
 (0)