I am trying to modify cfunc AST from
If (a1 && some_func_ptr) {
some_func_ptr();
}
To
if (a1) {
some_func_ptr();
}
But I constantly get INTERR 50683 error. I tried
new_item = idaapi.cexpr_t(item.cif.expr.x)
item.cif.expr.swap(new_item)
Also many other attempts to modify other parts of AST fail in the same way. I suspect that it has something to do with thisown flag, but various changes did nothing.