From 2abf39cda584397e2725b7a4ee9b8b5454f55109 Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 25 Apr 2020 14:13:11 -0400 Subject: [PATCH] Debugger: Fixed crash when displaying CPU/SA-1 instructions in the debugger for another cpu type (e.g CX4) --- Core/Disassembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Disassembler.cpp b/Core/Disassembler.cpp index 2cad152..43a0168 100644 --- a/Core/Disassembler.cpp +++ b/Core/Disassembler.cpp @@ -517,13 +517,13 @@ bool Disassembler::GetLineData(CpuType type, uint32_t lineIndex, CodeLineData &d state.K = (result.CpuAddress >> 16); if(!disInfo.IsInitialized()) { - disInfo = DisassemblyInfo(src.Data + result.Address.Address, state.PS, type); + disInfo = DisassemblyInfo(src.Data + result.Address.Address, state.PS, lineCpuType); } else { data.Flags |= (result.Address.Type != SnesMemoryType::PrgRom || _cdl->IsCode(data.AbsoluteAddress)) ? LineFlags::VerifiedCode : LineFlags::UnexecutedCode; } data.OpSize = disInfo.GetOpSize(); - data.EffectiveAddress = disInfo.GetEffectiveAddress(_console, &state, type); + data.EffectiveAddress = disInfo.GetEffectiveAddress(_console, &state, lineCpuType); if(data.EffectiveAddress >= 0) { data.Value = disInfo.GetMemoryValue(data.EffectiveAddress, _memoryDumper, memType, data.ValueSize);