Skip to content

Commit

Permalink
Fix regression in aCe output
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Oct 26, 2023
1 parent 4e7e12c commit 4f16499
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
19 changes: 11 additions & 8 deletions libr/core/cmd_anal.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14146,15 +14146,18 @@ static void cmd_anal_aC(RCore *core, const char *input) {
r_strbuf_appendf (sb, "?%s", nextele? ", ": "");
} else {
char *argstr = print_fcn_arg (core, arg->orig_c_type, arg->name, arg->fmt, arg->src, on_stack, 0);
r_strbuf_appendf (sb, "%s", argstr);
if (R_STR_ISNOTEMPTY (argstr)) {
r_strbuf_appendf (sb, "%s", argstr);
} else {
// const char *fmt = arg->orig_c_type;
ut64 addr = arg->src;
char *res = r_core_cmd_strf (core, "pfq %s @ 0x%08" PFMT64x, arg->fmt, addr);
// r_cons_printf ("pfq *%s @ 0x%08" PFMT64x"\n", arg->fmt, addr);
r_str_trim (res);
r_strbuf_appendf (sb, "%s", res);
free (res);
}
free (argstr);
// const char *fmt = arg->orig_c_type;
ut64 addr = arg->src;
char *res = r_core_cmd_strf (core, "pfq %s @ 0x%08" PFMT64x, arg->fmt, addr);
// r_cons_printf ("pfq *%s @ 0x%08" PFMT64x"\n", arg->fmt, addr);
r_str_trim (res);
r_strbuf_appendf (sb, "%s", res);
free (res);
}
}
r_strbuf_append (sb, ")");
Expand Down
28 changes: 14 additions & 14 deletions test/db/cmd/cmd_afb
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ opaddr: 0x1000011e9
"outputs": 2,
"ninstr": 14,
"instrs": [
4294971880,
4294971881,
4294971884,
4294971886,
4294971888,
4294971890,
4294971892,
4294971893,
4294971900,
4294971903,
4294971906,
4294971913,
4294971917,
4294971919
"0x1000011e8",
"0x1000011e9",
"0x1000011ec",
"0x1000011ee",
"0x1000011f0",
"0x1000011f2",
"0x1000011f4",
"0x1000011f5",
"0x1000011fc",
"0x1000011ff",
"0x100001202",
"0x100001209",
"0x10000120d",
"0x10000120f"
],
"traced": "0x0"
}
Expand Down

0 comments on commit 4f16499

Please sign in to comment.