afd works without arguments now

This commit is contained in:
pancake 2017-12-18 17:52:14 +01:00
parent 6fd67fc457
commit 85564dd4f7

View File

@ -1999,10 +1999,12 @@ static int cmd_anal_fcn(RCore *core, const char *input) {
case 'd': // "afd"
{
ut64 addr = 0;
if (input[2] == ' ') {
if (input[2] == '?') {
eprintf ("afd [offset]\n");
} else if (input[2] == ' ') {
addr = r_num_math (core->num, input + 2);
} else {
eprintf ("afd [offset]\n");
addr = core->offset;
}
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, addr, 0);
if (fcn) {