Skip to content

Commit f063421

Browse files
committed
fix iter_instruction_matches
1 parent e9da361 commit f063421

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description = "Python wrapper to manipulate bindiff files"
88
authors = [{ name = "Robin David", email = "[email protected]" }]
99
license = { text = "Apache Software License (Apache License, Version 2)" }
1010
readme = { file = "README.md", content-type = "text/markdown" }
11-
version = '0.2.1'
11+
version = '0.2.2'
1212
requires-python = ">=3.9"
1313
dependencies = [
1414
"python-magic; os_name!='nt'",

src/bindiff/bindiff.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ def iter_instruction_matches(
242242
"""
243243
insts = []
244244
for addr, instr in block1.instructions.items():
245-
if addr2 := self.primary_instruction_match.get(addr):
246-
insts.append((instr, block2.instructions[addr2]))
245+
if inst_map := self.primary_instruction_match.get(addr):
246+
if addr2 := inst_map.get(block1.function.addr):
247+
insts.append((instr, block2.instructions[addr2]))
247248
return insts
248249

249250
def get_match(

0 commit comments

Comments
 (0)