x86: AT&T syntax is irrelevant in Diet mode, so setting this syntax should return CS_ERR_DIET error

This commit is contained in:
Nguyen Anh Quynh 2014-05-14 23:48:17 +08:00
parent f7850266d5
commit 7bab8dc12e
1 changed files with 5 additions and 2 deletions

View File

@ -41,11 +41,14 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
handle->printer = X86_Intel_printInst;
break;
#ifndef CAPSTONE_DIET
// this is irrelevant in CAPSTONE_DIET mode
case CS_OPT_SYNTAX_ATT:
#ifndef CAPSTONE_DIET
handle->printer = X86_ATT_printInst;
break;
#else
// this is irrelevant in CAPSTONE_DIET mode
handle->errnum = CS_ERR_DIET;
return CS_ERR_DIET;
#endif
}
}