Skip to content

Commit

Permalink
Debugger: SNES - Fixed crash in GSU debugger when negative jump targe…
Browse files Browse the repository at this point in the history
…t wraps past 0
  • Loading branch information
SourMesen committed Nov 16, 2023
1 parent 10aa708 commit 13be4e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/SNES/Debugger/GsuDisUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void GsuDisUtils::GetDisassembly(DisassemblyInfo &info, string &out, uint32_t me
FastString str(settings->GetDebugConfig().UseLowerCaseDisassembly);

auto getJumpTarget = [&str, labelManager, memoryAddr, &info]() {
uint32_t jmpTarget = memoryAddr + (int8_t)info.GetByteCode()[1] + 2;
uint32_t jmpTarget = (memoryAddr + (int8_t)info.GetByteCode()[1] + 2) & 0xFFFFFF;
AddressInfo address = { (int32_t)jmpTarget, MemoryType::GsuMemory };
string label = labelManager ? labelManager->GetLabel(address) : "";
if(label.empty()) {
Expand Down

0 comments on commit 13be4e8

Please sign in to comment.