mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-05 21:13:27 +00:00
Attempt to fix #10693 issue.
This commit is contained in:
parent
927bfbae73
commit
c5ec231946
@ -3600,6 +3600,7 @@ R_API void r_core_anal_fcn_merge (RCore *core, ut64 addr, ut64 addr2) {
|
||||
RAnalBlock *bb;
|
||||
RAnalFunction *f1 = r_anal_get_fcn_at (core->anal, addr, 0);
|
||||
RAnalFunction *f2 = r_anal_get_fcn_at (core->anal, addr2, 0);
|
||||
RAnalFunction *f3 = NULL;
|
||||
if (!f1 || !f2) {
|
||||
eprintf ("Cannot find function\n");
|
||||
return;
|
||||
@ -3647,7 +3648,12 @@ R_API void r_core_anal_fcn_merge (RCore *core, ut64 addr, ut64 addr2) {
|
||||
// resize
|
||||
f2->bbs = NULL;
|
||||
r_anal_fcn_tree_delete (&core->anal->fcn_tree, f2);
|
||||
r_list_delete_data (core->anal->fcns, f2);
|
||||
r_list_foreach (core->anal->fcns, iter, f2) {
|
||||
if (f2 == f3) {
|
||||
r_list_delete (core->anal->fcns, iter);
|
||||
f3->bbs = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
R_API void r_core_anal_auto_merge (RCore *core, ut64 addr) {
|
||||
|
@ -594,11 +594,11 @@ int main () {
|
||||
|
||||
{
|
||||
char *str;
|
||||
r_list_foreach(l, iter, str) {
|
||||
r_list_foreach (l, iter, str) {
|
||||
printf("-- %s\n", str);
|
||||
}
|
||||
printf("--**--\n");
|
||||
r_list_foreach_prev(l, iter, str) {
|
||||
r_list_foreach_prev (l, iter, str) {
|
||||
printf("-- %s\n", str);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user