Merge pull request #5926 from Sonicadvance1/234

Frontend: Stop asserting on too long of an instruction
This commit is contained in:
LC authored and GitHub committed 2026-09-05 03:29:29 -04:00
commit abec314720
1 file changed
+1 -2
+1 -2
View File
@@ -114,9 +114,8 @@ bool Decoder::CheckRangeExecutable(uint64_t Address, uint64_t Size) {
}
uint8_t Decoder::ReadByte() {
LOGMAN_THROW_A_FMT(InstructionSize < MAX_INST_SIZE, "Max instruction size exceeded!");
std::optional<uint8_t> Byte = PeekByte(0);
if (!Byte) {
if (!Byte || InstructionSize == MAX_INST_SIZE) {
HitNonExecutableRange = true;
// Pretend we read 0, the main decode loop will see HitNonExecutableRange and rollback the instruction.
return 0;