Fix #14854 - Fix glitch in asm.hint.pos=0

This commit is contained in:
pancake 2019-08-23 00:18:06 +02:00
parent 72df7056f5
commit 8225d57eb4
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,7 @@ include $(TOP)/libr/config.mk
include p/capstone.mk
LDFLAGS+=${CS_LDFLAGS}
include $(STOP)/java/deps.mk
include $(STOP)/capstone.mk
.PHONY: all plugins

View File

@ -3501,11 +3501,14 @@ static bool ds_print_core_vmode(RDisasmState *ds, int pos) {
break;
}
if (ds->asm_hint_pos > 0) {
int begin = (gotShortcut) ? (ds->asm_hint_pos == 0)? 1: 2: 3;
int begin = gotShortcut ? 2: 3;
for (i = begin - slen; i > 0; i--) {
r_cons_strcat (" ");
}
}
if (ds->asm_hint_pos == 0 && !gotShortcut) {
r_cons_strcat (" ");
}
ds->hinted_line = gotShortcut;
return gotShortcut;
}