mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 03:54:18 +01:00
- Fixed a really subtle bug in some of the uses of _IDC_SetAttr(). In a couple of locations the call is made as part of the condition of an IF. But _IDC_SetAttr() will always return None ( "return setattr(obj, attrmap[attroffs][1], value)" ), leading to the value being properly set in the instance but never updated in the IDB. Which led to mysterious behavior because of "vanishing" attributes
This commit is contained in:
parent
4bd83af5a3
commit
53d99a141a
@ -3892,7 +3892,8 @@ def SetFunctionAttr(ea, attr, value):
|
||||
"""
|
||||
func = idaapi.get_func(ea)
|
||||
|
||||
if func and _IDC_SetAttr(func, _FUNCATTRMAP, attr, value):
|
||||
if func:
|
||||
_IDC_SetAttr(func, _FUNCATTRMAP, attr, value)
|
||||
return idaapi.update_func(func)
|
||||
|
||||
|
||||
@ -5231,7 +5232,8 @@ def SetFchunkAttr(ea, attr, value):
|
||||
"""
|
||||
if attr in [ FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER ]:
|
||||
chunk = idaapi.get_fchunk(ea)
|
||||
if chunk and _IDC_SetAttr(chunk, _FUNCATTRMAP, attr, value):
|
||||
if chunk:
|
||||
_IDC_SetAttr(chunk, _FUNCATTRMAP, attr, value)
|
||||
return idaapi.update_func(chunk)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user