From 8ab8db58099f09a86e00c60382615bfd1d9c09da Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 11 Jan 2021 00:03:08 -0500 Subject: [PATCH] i dont see why ram watches have to be "valid hardware addresses" it should show exactly whatever hex editor does. it's probably old and out of date. --- src/drivers/win/ram_search.cpp | 2 +- src/drivers/win/ramwatch.cpp | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/drivers/win/ram_search.cpp b/src/drivers/win/ram_search.cpp index 03440fb3..823ccb65 100644 --- a/src/drivers/win/ram_search.cpp +++ b/src/drivers/win/ram_search.cpp @@ -989,7 +989,7 @@ unsigned int ReadValueAtHardwareAddress(HWAddressType address, unsigned int size for(unsigned int i = 0; i < size; i++) { value <<= 8; - value |= (IsHardwareAddressValid(address) ? GetMem(address) : 0); + value |= GetMem(address); address++; } return value; diff --git a/src/drivers/win/ramwatch.cpp b/src/drivers/win/ramwatch.cpp index ca09dfee..c8b78554 100644 --- a/src/drivers/win/ramwatch.cpp +++ b/src/drivers/win/ramwatch.cpp @@ -997,20 +997,6 @@ INT_PTR CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara do { sscanf(next, "%04X", &msg->Addresses[i]); - // When an invalid address is in it - if (!IsHardwareAddressValid(msg->Addresses[i])) - { - MessageBox(hDlg, "You have entered an invalid address.", "Error", MB_ICONERROR | MB_OK); - // Comment out, leave it unfreed until next ID_OK event or close the dialog - // free(msg->Addresses); - // msg->Addresses = NULL; - - char* start = next + strspn(next, ", "); - char* end = start + strcspn(start, ", "); - SendDlgItemMessage(hDlg, addrCtrlID, EM_SETSEL, start - str_addrs, end - str_addrs); - SetFocus(GetDlgItem(hDlg, addrCtrlID)); - return true; - } ++i; if (i == addrSize) msg->Addresses = (unsigned int*)realloc(msg->Addresses, sizeof(unsigned int) * (addrSize += 4));