Handle idc.SetType return value correctly.
Apparently, idc.SetType returns True if the type is set for the first time, False if the type is updated, and None if the type couldn't be set (rather differently from what the documentation says).
This commit is contained in:
@@ -65,7 +65,7 @@ def MakeFunction(start):
|
||||
|
||||
def SetType(addr, type):
|
||||
ret = idc.SetType(addr, type)
|
||||
if ret == 0:
|
||||
if ret is None:
|
||||
print('SetType(0x%x, %r) failed!' % (addr, type))
|
||||
");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user