Skip to content

Commit

Permalink
Make sure import entities have a name
Browse files Browse the repository at this point in the history
  • Loading branch information
disinvite committed Mar 2, 2025
1 parent b6010d7 commit 61de735
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions reccmp/isledecomp/compare/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,23 @@ def _match_imports(self):
for dll, name, addr in self.orig_bin.imports:
import_name = f"{dll.upper()}:{name}"
batch.set_orig(
addr, import_name=import_name, size=4, type=EntityType.IMPORT
addr,
name=f"__imp__{name}",
import_name=import_name,
size=4,
type=EntityType.IMPORT,
)

for dll, name, addr in self.recomp_bin.imports:
# TODO: recomp imports should already have a name from the PDB
# but set it anyway to avoid problems later.
import_name = f"{dll.upper()}:{name}"
batch.set_recomp(
addr, import_name=import_name, size=4, type=EntityType.IMPORT
addr,
name=f"__imp__{name}",
import_name=import_name,
size=4,
type=EntityType.IMPORT,
)

# Combine these two dictionaries. We don't care about imports from recomp
Expand Down

0 comments on commit 61de735

Please sign in to comment.