diff --git a/libr/core/visual.c b/libr/core/visual.c index 9e619c2b9e6a2..0d7c70ef2bd2c 100644 --- a/libr/core/visual.c +++ b/libr/core/visual.c @@ -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); } @@ -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;