Fix uc_mode usage in source code
This commit is contained in:
4
uc.c
4
uc.c
@ -183,7 +183,7 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
|
||||
case UC_ARCH_X86:
|
||||
if ((mode & ~UC_MODE_X86_MASK) ||
|
||||
(mode & UC_MODE_BIG_ENDIAN) ||
|
||||
!(mode & (UC_MODE_16|UC_MODE_32|UC_MODE_64)) {
|
||||
!(mode & (UC_MODE_16|UC_MODE_32|UC_MODE_64))) {
|
||||
free(uc);
|
||||
return UC_ERR_MODE;
|
||||
}
|
||||
@ -217,7 +217,7 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
|
||||
#if defined(UNICORN_HAS_MIPS) || defined(UNICORN_HAS_MIPSEL) || defined(UNICORN_HAS_MIPS64) || defined(UNICORN_HAS_MIPS64EL)
|
||||
case UC_ARCH_MIPS:
|
||||
if ((mode & ~UC_MODE_MIPS_MASK) ||
|
||||
!(mode & (UC_MODE_MIPS32|UC_MODE_MIPS64)) {
|
||||
!(mode & (UC_MODE_MIPS32|UC_MODE_MIPS64))) {
|
||||
free(uc);
|
||||
return UC_ERR_MODE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user