Skip to content

Commit

Permalink
Fix enum naming input
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz committed Apr 5, 2024
1 parent cad7d5f commit 695bc57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libbs/decompilers/ghidra/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def _get_enum(self, name) -> Optional[Enum]:
if is_valid_enum is None:
return None

members = self._get_enum_members('/' + name)
members = self._get_enum_members(name)
return Enum(name, members) if members else None

def _enums(self) -> Dict[str, Enum]:
Expand Down Expand Up @@ -790,6 +790,6 @@ def _run_until_server_closed(self, sleep_interval=30):
time.sleep(sleep_interval)

def _get_ghidra_enum(self, enum_name: str) -> Optional["EnumDB"]:
ghidra_enum = self.ghidra.currentProgram.getDataTypeManager().getDataType(enum_name)
ghidra_enum = self.ghidra.currentProgram.getDataTypeManager().getDataType("/" + enum_name)
EnumDBType = self.ghidra.import_module_object("ghidra.program.database.data", "EnumDB")
return ghidra_enum if self.ghidra.isinstance(ghidra_enum, EnumDBType) else None

0 comments on commit 695bc57

Please sign in to comment.