mirror of
https://github.com/zoriya/dasm.git
synced 2026-05-30 01:15:06 +00:00
Fix imm addr bug
This commit is contained in:
+14
-1
@@ -64,8 +64,21 @@ unsigned long read_size(u_int8_t *binary, unsigned size)
|
||||
bool has_reg(const instruction_t *inst)
|
||||
{
|
||||
for (int i = 0; inst->mode[i] != END; i++) {
|
||||
if (inst->mode[i] == REG8 || inst->mode[i] == REG16)
|
||||
switch (inst->mode[i]) {
|
||||
case REG8:
|
||||
case REG16:
|
||||
case R_M8:
|
||||
case R_M16:
|
||||
return true;
|
||||
case OPREG8:
|
||||
case OPREG16:
|
||||
case IMM8:
|
||||
case IMM16:
|
||||
case REL8:
|
||||
case REL16:
|
||||
case END:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user