Skip to content

Commit

Permalink
Fix visual xrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 3, 2018
1 parent ebf02bb commit 9fff3e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libr/core/visual.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,9 @@ R_API int r_core_visual_refs(RCore *core, bool xref, bool fcnInsteadOfAddr) {
RAnalFunction *fun = r_anal_get_fcn_in (core->anal, addr, R_ANAL_FCN_TYPE_NULL);
if (fun) {
if (xref) { // function xrefs
xrefs = r_anal_fcn_get_xrefs (core->anal, fun);
xrefs = r_anal_xrefs_get (core->anal, addr);
//XXX xrefs = r_anal_fcn_get_xrefs (core->anal, fun);
// this function is buggy so we must get the xrefs of the addr
} else { // functon refs
xrefs = r_anal_fcn_get_refs (core->anal, fun);
}
Expand Down Expand Up @@ -1248,8 +1250,8 @@ R_API int r_core_visual_refs(RCore *core, bool xref, bool fcnInsteadOfAddr) {
}
goto repeat;
} else if (ch == 'x' || ch == '<') {
xrefsMode = !xrefsMode;
xref = true;
xrefsMode = !xrefsMode;
goto repeat;
} else if (ch == 'X' || ch == '>') {
xref = false;
Expand Down

0 comments on commit 9fff3e8

Please sign in to comment.