From f4f5aa0441de48bbc616956bdcd5cb6e0f1eb7ed Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Sun, 22 Mar 2009 15:27:46 +0000 Subject: [PATCH] idc.py: Fixed GetOpType() and GetOperandValue() to use decode_insn() so they are not destructive idc.py: Fixed MakeCode() to use the new create_insn() --- python/idc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/idc.py b/python/idc.py index 99782b9..c03fedd 100644 --- a/python/idc.py +++ b/python/idc.py @@ -578,7 +578,7 @@ def MakeCode(ea): would overlap with existing items, etc) otherwise returns length of the instruction in bytes """ - return idaapi.ua_code(ea) + return idaapi.create_insn(ea) def AnalyzeArea(sEA, eEA): @@ -2096,7 +2096,7 @@ def GetOpType(ea, n): @return: any of o_* constants or -1 on error """ - inslen = idaapi.ua_code(ea) + inslen = idaapi.decode_insn(ea) if inslen == 0: return -1 @@ -2169,7 +2169,7 @@ def GetOperandValue(ea, n): operand is a register phrase => phrase number otherwise => -1 """ - inslen = idaapi.ua_code(ea) + inslen = idaapi.decode_insn(ea) if inslen == 0: return -1