Skip to content

Commit

Permalink
Merge pull request #92 from laomaiweng/patch-2
Browse files Browse the repository at this point in the history
IDA 7.5 parse_reg_name() compatibility
  • Loading branch information
tmr232 committed Sep 2, 2020
2 parents 2864c99 + ed6af1c commit 37045b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sark/code/base.py
Expand Up @@ -36,7 +36,10 @@ def is_ea_call(ea):

def get_register_info(reg_name):
ri = idaapi.reg_info_t()
success = idaapi.parse_reg_name(reg_name, ri)
if idaapi.IDA_SDK_VERSION >= 750:
success = idaapi.parse_reg_name(ri, reg_name)
else:
success = idaapi.parse_reg_name(reg_name, ri)
if not success:
raise exceptions.SarkInvalidRegisterName("No register named {!r}".format(reg_name))
return ri
Expand Down

0 comments on commit 37045b4

Please sign in to comment.