summaryrefslogtreecommitdiff
path: root/python/examples/linear_mlil.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2022-10-24 16:10:05 -0600
committerPeter LaFosse <peter@vector35.com>2022-11-10 16:19:13 -0500
commitccf83b992b7f0de00d384d17b1a3406a0fca28ab (patch)
treea51653dfd00f38286021fabfac1a307346077c91 /python/examples/linear_mlil.py
parent57aa7249fe0fdfa5cabc5231595314df91d12729 (diff)
Fix rendering of code lines when scrolling right, fix TokenizedTextView example
Diffstat (limited to 'python/examples/linear_mlil.py')
-rw-r--r--python/examples/linear_mlil.py6
1 files changed, 3 insertions, 3 deletions
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