Skip to content

Commit

Permalink
Add zero operands check
Browse files Browse the repository at this point in the history
  • Loading branch information
R33v0LT committed Feb 25, 2024
1 parent d829594 commit 09462b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/HPPA/HPPAInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,16 @@ static void print_operand(MCInst *MI, struct SStream *O, const cs_hppa_op *op)

static void fill_operands(MCInst *MI, cs_hppa *hppa)
{
hppa->op_count = 0;
unsigned mc_op_count = MCInst_getNumOperands(MI);
if (mc_op_count == 0)
return;

MCOperand *ops[mc_op_count];
for (unsigned i = 0; i < mc_op_count; i++) {
ops[i] = MCInst_getOperand(MI, i);
}

hppa->op_count = 0;
hppa_ext *hppa_ext = &MI->hppa_ext;
uint32_t opcode = MCInst_getOpcode(MI);

Expand Down

0 comments on commit 09462b9

Please sign in to comment.