mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-06 18:34:17 +00:00
Clear MCInst when the decode fails, to reset operand counter.
This commit is contained in:
parent
dddf0d1faa
commit
90b6007454
@ -1030,6 +1030,9 @@ void PrinterCapstone::decoderEmitterEmitDecodeInstruction(
|
||||
<< " /* Decoding complete. */ \\\n"
|
||||
<< " return S; \\\n"
|
||||
<< " } else { \\\n"
|
||||
<< " /* LLVM uses a MCInst on the stack, but for our use case, */ \\\n"
|
||||
<< " /* it is enough for now to reset the op counter. */ \\\n"
|
||||
<< " MCInst_clear(MI); \\\n"
|
||||
<< " /* If the decoding was incomplete, skip. */ \\\n"
|
||||
<< " Ptr += NumToSkip; \\\n"
|
||||
<< " /* Reset decode status. This also drops a SoftFail status "
|
||||
|
Loading…
Reference in New Issue
Block a user