Frontend: Zero InstructionSize before decoding

Required for PeekByte to work correctly before decoding.
This commit is contained in:
Billy Laws committed 2025-02-06 00:01:17 +00:00
1 parent 151fc5e97f
commit 6e01934edc
1 file changed
+2
@@ -1174,6 +1174,8 @@ void Decoder::DecodeInstructionsAtEntry(const uint8_t* _InstStream, uint64_t PC,
InstStream = AdjustAddrForSpecialRegion(_InstStream, EntryPoint, RIPToDecode);
while (1) {
InstructionSize = 0;
// MAX_INST_SIZE assumes worst case
auto OpAddress = RIPToDecode + PCOffset;
auto OpMaxAddress = OpAddress + MAX_INST_SIZE;