Skip to content

Commit

Permalink
fix iter_instruction_matches
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDavid committed Feb 23, 2024
1 parent e9da361 commit f063421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Python wrapper to manipulate bindiff files"
authors = [{ name = "Robin David", email = "[email protected]" }]
license = { text = "Apache Software License (Apache License, Version 2)" }
readme = { file = "README.md", content-type = "text/markdown" }
version = '0.2.1'
version = '0.2.2'
requires-python = ">=3.9"
dependencies = [
"python-magic; os_name!='nt'",
Expand Down
5 changes: 3 additions & 2 deletions src/bindiff/bindiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ def iter_instruction_matches(
"""
insts = []
for addr, instr in block1.instructions.items():
if addr2 := self.primary_instruction_match.get(addr):
insts.append((instr, block2.instructions[addr2]))
if inst_map := self.primary_instruction_match.get(addr):
if addr2 := inst_map.get(block1.function.addr):
insts.append((instr, block2.instructions[addr2]))
return insts

def get_match(
Expand Down

0 comments on commit f063421

Please sign in to comment.