From ccf83b992b7f0de00d384d17b1a3406a0fca28ab Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 24 Oct 2022 16:10:05 -0600 Subject: Fix rendering of code lines when scrolling right, fix TokenizedTextView example --- python/examples/linear_mlil.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/examples/linear_mlil.py b/python/examples/linear_mlil.py index e4df1765..6f2426f2 100644 --- a/python/examples/linear_mlil.py +++ b/python/examples/linear_mlil.py @@ -46,7 +46,7 @@ class LinearMLILView(TokenizedTextView): # Sort basic blocks by IL instruction index blocks = il.basic_blocks - blocks.sort(key=lambda block: block.start) + list(blocks).sort(key=lambda block: block.start) # Function header result = [] @@ -82,12 +82,12 @@ class LinearMLILView(TokenizedTextView): ) ) for i in block: - lines, length = renderer.get_disassembly_text(i.instr_index) + lines = renderer.get_disassembly_text(i.instr_index) lastAddr = i.address lineIndex = 0 for line in lines: result.append( - LinearDisassemblyLine(LinearDisassemblyLineType.CodeDisassemblyLineType, self.function, block, line) + LinearDisassemblyLine(LinearDisassemblyLineType.CodeDisassemblyLineType, self.function, block, line[0]) ) lineIndex += 1 lastBlock = block -- cgit v1.3.1