Skip to content

Commit

Permalink
change cases flag format
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanpencil committed Jun 26, 2018
1 parent e72d5e7 commit 7928f72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libr/anal/fcn.c
Expand Up @@ -442,8 +442,8 @@ static void queue_case(RAnal *anal, ut64 switch_addr, ut64 case_addr, ut64 id, u
// "CCu case %d: @ 0x%"PFMT64x "\n",
// id, case_addr);
anal->cmdtail = r_str_appendf (anal->cmdtail,
"f case.%d.0x%"PFMT64x " 1 @ 0x%08"PFMT64x "\n",
id, switch_addr, case_addr);
"f case.0x%"PFMT64x ".%d 1 @ 0x%08"PFMT64x "\n",
switch_addr, id, case_addr);
}

static int try_walkthrough_jmptbl(RAnal *anal, RAnalFunction *fcn, int depth, ut64 ip, ut64 jmptbl_loc, ut64 jmptbl_off, ut64 sz, ut64 jmptbl_size, ut64 default_case, int ret0) {
Expand Down
2 changes: 1 addition & 1 deletion libr/core/disasm.c
Expand Up @@ -1860,7 +1860,7 @@ static void ds_show_flags(RDisasmState *ds) {
continue;
}
if (!strncmp (flag->name, "case.", 5)) {
sscanf (flag->name + 5, "%d.%63s", &case_current, addr);
sscanf (flag->name + 5, "%63[^.].%d", addr, &case_current);
ut64 saddr = r_num_math (core->num, addr);
if (case_start == -1) {
switch_addr = saddr;
Expand Down

0 comments on commit 7928f72

Please sign in to comment.