only verify x86_prefix[0] for x86 arch. bug reported by @pancake

This commit is contained in:
Nguyen Anh Quynh 2014-07-02 09:08:10 +08:00
parent 9f6ed7155a
commit 1d3100ad5b
1 changed files with 1 additions and 1 deletions

2
cs.c
View File

@ -278,7 +278,7 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
// find first space or tab
sp = buffer;
mnem = insn->mnemonic;
if (mci->x86_prefix[0]) {
if (mci->csh->arch == CS_ARCH_X86 && mci->x86_prefix[0]) {
for (sp = buffer; *sp; sp++) {
if (*sp == ' '|| *sp == '\t')
break;