Skip to content

Commit

Permalink
in IDA 8.4 - ida_typeinf.idc_print_type() may return a hex-string tha…
Browse files Browse the repository at this point in the history
…t ends with "LL".

when attempting to convert it to int() it throws an exception and fails.
added replace("LL", "") to resolve it
  • Loading branch information
woot committed Mar 6, 2024
1 parent 5dfb2b7 commit a9027e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hashdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ def get_existing_enum_values(enum_name):
split_entries = type_definition[opening_bracket_position+1:closing_bracket_position-1].split(",")
for enum_value_name, enum_value_str in (entry.split(" = ") for entry in split_entries):
base = 16 if enum_value_str.startswith("0x") or enum_value_str.startswith("-0x") else 10
enum_value_str = enum_value_str.replace("LL", "")
hash_values[enum_value_name] = int(enum_value_str, base)

return hash_values
Expand Down

0 comments on commit a9027e6

Please sign in to comment.