evm: simplify EVM_get_insn_id()
diff --git a/arch/EVM/EVMMapping.c b/arch/EVM/EVMMapping.c
index 230d8b5..32edbe5 100644
--- a/arch/EVM/EVMMapping.c
+++ b/arch/EVM/EVMMapping.c
@@ -35,14 +35,12 @@
{
insn->id = id;
#ifndef CAPSTONE_DIET
- int i = evm_insn_find(insns, ARR_SIZE(insns), id);
- //printf(">> id = %u\n", id);
- if (i >= 0) {
+ if (evm_insn_find(insns, ARR_SIZE(insns), id)) > 0 {
if (h->detail) {
cs_struct handle;
handle.detail = h->detail;
- memcpy(&insn->detail->evm, &insns[i], sizeof(insns[i]));
+ memcpy(&insn->detail->evm, &insns[id], sizeof(insns[id]));
}
}
#endif