@@ -89,9 +89,8 @@ int main(int argc, char** argv)
8989
9090 // Attempt to decode the given bytes as an X86-64 instruction.
9191 ZydisDecodedInstruction instr ;
92- ZydisDecodedOperand operands [ZYDIS_MAX_OPERAND_COUNT_VISIBLE ];
93- ZyanStatus status = ZydisDecoderDecodeFull (& decoder , bytes , num_bytes , & instr , operands ,
94- ZYDIS_MAX_OPERAND_COUNT_VISIBLE , ZYDIS_DFLAG_VISIBLE_OPERANDS_ONLY );
92+ ZydisDecodedOperand operands [ZYDIS_MAX_OPERAND_COUNT ];
93+ ZyanStatus status = ZydisDecoderDecodeFull (& decoder , bytes , num_bytes , & instr , operands );
9594 if (ZYAN_FAILED (status ))
9695 {
9796 fprintf (stderr , "Failed to decode instruction: %02" PRIx32 , status );
@@ -157,7 +156,7 @@ int main(int argc, char** argv)
157156
158157 // Decode and print the new instruction. We re-use the old buffers.
159158 ExpectSuccess (ZydisDecoderDecodeFull (& decoder , new_bytes , new_instr_length , & instr ,
160- operands , ZYDIS_MAX_OPERAND_COUNT_VISIBLE , ZYDIS_DFLAG_VISIBLE_OPERANDS_ONLY ));
159+ operands ));
161160 ExpectSuccess (ZydisFormatterFormatInstruction (& fmt , & instr , operands ,
162161 instr .operand_count_visible , fmt_buf , sizeof (fmt_buf ), 0 , NULL ));
163162 printf ("New instruction: %s\n" , fmt_buf );
0 commit comments