Fixed looking for the right instructions when there are no arguments

This commit is contained in:
Pierre Pronchery 2011-04-18 22:05:40 +00:00
parent c5d171cf7e
commit c4194014ab

View File

@ -212,6 +212,8 @@ static int _call_operands(Arch * arch, ArchInstruction * instruction,
ArchOperandDefinition definition; ArchOperandDefinition definition;
ArchOperand * operand; ArchOperand * operand;
if(call->operands_cnt == 0 && AO_GET_TYPE(instruction->op1) != AOT_NONE)
return -1;
for(i = 0; i < call->operands_cnt; i++) for(i = 0; i < call->operands_cnt; i++)
{ {
definition = (i == 0) ? instruction->op1 : ((i == 1) definition = (i == 0) ? instruction->op1 : ((i == 1)