From 9e49bfc338ab774d06e316a771a7afc200576aac Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 6 Oct 2016 03:42:49 +0200 Subject: [PATCH] Honor pal_comment and fix indent for asm.emu --- libr/core/disasm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libr/core/disasm.c b/libr/core/disasm.c index 5259c692ec..704eeaa5fb 100644 --- a/libr/core/disasm.c +++ b/libr/core/disasm.c @@ -2850,10 +2850,10 @@ static int myregwrite(RAnalEsil *esil, const char *name, ut64 val) { } if (ds && ds->show_emu_str) { if (msg && *msg) { - r_cons_printf ("; %s", msg); + r_cons_printf (" ; %s", msg); } } else { - r_cons_printf ("; %s=0x%"PFMT64x" %s", name, val, msg? msg: ""); + r_cons_printf (" ; %s=0x%"PFMT64x" %s", name, val, msg? msg: ""); } free (msg); return 0; @@ -2932,6 +2932,9 @@ static void ds_print_esil_anal(RDisasmState *ds) { goto beach; } } + if (ds->show_color) { + r_cons_strcat (ds->pal_comment); + } ioc = r_config_get_i (core->config, "io.cache"); r_config_set (core->config, "io.cache", "true"); ds_align_comment (ds); @@ -3233,7 +3236,7 @@ toro: // TODO: support in-the-middle-of-instruction too r_anal_op_fini (&ds->analop); if (r_anal_op (core->anal, &ds->analop, core->offset + core->print->cur, - buf+core->print->cur, (int)(len - core->print->cur))) { + buf + core->print->cur, (int)(len - core->print->cur))) { // TODO: check for ds->analop.type and ret ds->dest = ds->analop.jump; }