Skip to content

Commit

Permalink
Debugger: Don't try to hash invalid RAM.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Dec 21, 2021
1 parent 293b5c0 commit 9017f91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Core/Debugger/DisassemblyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ bool IsLikelyStringAt(uint32_t addr) {

static HashType computeHash(u32 address, u32 size)
{
if (!Memory::IsValidAddress(address))
return 0;

size = Memory::ValidSize(address, size);
#if PPSSPP_ARCH(AMD64)
return XXH3_64bits(Memory::GetPointer(address), size);
return XXH3_64bits(Memory::GetPointerUnchecked(address), size);
#else
return XXH3_64bits(Memory::GetPointer(address), size) & 0xFFFFFFFF;
return XXH3_64bits(Memory::GetPointerUnchecked(address), size) & 0xFFFFFFFF;
#endif
}

Expand Down

0 comments on commit 9017f91

Please sign in to comment.