Debugger: Fix memory lookup in mirrors/uncached.

Oops, was crashing before since it's outside the index.
This commit is contained in:
Unknown W. Brackets 2021-02-07 17:06:14 -08:00
parent d48bb7e105
commit a4ed6eb167
2 changed files with 4 additions and 2 deletions

View File

@ -371,6 +371,7 @@ void NotifyMemInfoPC(MemBlockFlags flags, uint32_t start, uint32_t size, uint32_
std::vector<MemBlockInfo> FindMemInfo(uint32_t start, uint32_t size) {
FlushPendingMemInfo();
start &= ~0xC0000000;
std::vector<MemBlockInfo> results;
allocMap.Find(MemBlockFlags::ALLOC, start, size, results);
@ -382,6 +383,7 @@ std::vector<MemBlockInfo> FindMemInfo(uint32_t start, uint32_t size) {
std::vector<MemBlockInfo> FindMemInfoByFlag(MemBlockFlags flags, uint32_t start, uint32_t size) {
FlushPendingMemInfo();
start &= ~0xC0000000;
std::vector<MemBlockInfo> results;
if (flags & MemBlockFlags::ALLOC)

View File

@ -240,7 +240,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam) {
}
for (int j = 0; j < rowSize; j++) {
uint32_t byteAddress = address + j;
const uint32_t byteAddress = (address + j) & ~0xC0000000;
std::string tag;
bool tagContinues = false;
for (auto info : memRangeInfo) {
@ -272,7 +272,7 @@ void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam) {
COLORREF asciiTextCol = 0x000000;
int underline = -1;
if (byteAddress == curAddress && searching == false) {
if (address + j == curAddress && searching == false) {
if (asciiSelected) {
hexBGCol = 0xC0C0C0;
hexTextCol = 0x000000;