Fix uc_mode usage in source code

This commit is contained in:
xorstream
2016-01-23 12:08:49 +11:00
parent b7c43108bd
commit 8763d426c2
8 changed files with 59 additions and 70 deletions

4
uc.c
View File

@@ -190,7 +190,7 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
return UC_ERR_MODE;
}
if (mode == UC_MODE_THUMB)
if (mode & UC_MODE_THUMB)
uc->thumb = 1;
break;
#endif
@@ -226,7 +226,7 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
#ifdef UNICORN_HAS_SPARC
case UC_ARCH_SPARC:
if (mode & UC_MODE_64)
if (mode & UC_MODE_SPARC64)
uc->init_arch = sparc64_uc_init;
else
uc->init_arch = sparc_uc_init;