x86: printDstIdx() should only print segment in non-64bit mode. bug reported by Filipe Cabecinhas (@filcab)

This commit is contained in:
Nguyen Anh Quynh 2014-06-05 17:03:52 +07:00
parent 4aacbea1b6
commit 9417ad6cd5
1 changed files with 4 additions and 1 deletions

View File

@ -229,7 +229,10 @@ static void printSrcIdx(MCInst *MI, unsigned Op, SStream *O)
static void printDstIdx(MCInst *MI, unsigned Op, SStream *O)
{
// DI accesses are always ES-based.
SStream_concat(O, "es:[");
if (MI->csh->mode != CS_MODE_64)
SStream_concat(O, "es:[");
else
SStream_concat(O, "[");
printOperand(MI, Op, O);
SStream_concat(O, "]");
}