From b5d1bbf333b0c5f0600ded5ee6581d693f76cb8b Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 19 Aug 2016 14:13:57 +0200 Subject: [PATCH] Fix afn without argument issue --- libr/core/cmd_anal.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libr/core/cmd_anal.c b/libr/core/cmd_anal.c index cbbd669da0..653f6a1101 100644 --- a/libr/core/cmd_anal.c +++ b/libr/core/cmd_anal.c @@ -1279,12 +1279,6 @@ static int cmd_anal_fcn(RCore *core, const char *input) { break; case 'n': // "afn" switch (input[2]) { - case '?': - eprintf ("Usage: afn[sa] - analyze function names\n"); - eprintf (" afna - construct a function name for the current offset\n"); - eprintf (" afns - list all strings associated with the current function\n"); - eprintf (" afn [name] - rename function\n"); - break; case 's': free (r_core_anal_fcn_autoname (core, core->offset, 1)); break; @@ -1297,7 +1291,7 @@ static int cmd_anal_fcn(RCore *core, const char *input) { } } break; - default: + case ' ': { ut64 off = core->offset; char *p, *name = strdup (input + 3); @@ -1316,6 +1310,12 @@ static int cmd_anal_fcn(RCore *core, const char *input) { } } break; + default: + eprintf ("Usage: afn[sa] - analyze function names\n"); + eprintf (" afna - construct a function name for the current offset\n"); + eprintf (" afns - list all strings associated with the current function\n"); + eprintf (" afn [name] - rename function\n"); + break; } break; #if 0