diff --git a/Makefile b/Makefile index bbfabd8f..e116a0dc 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules #--------------------------------------------------------------------------------- VERSION_MAJOR := 3 VERSION_MINOR := 6 -VERSION_MICRO := 4 +VERSION_MICRO := 5 NIGHTLY := APP_TITLE := EdiZon SE diff --git a/include/guis/gui_cheats.hpp b/include/guis/gui_cheats.hpp index f6305703..389bab3c 100644 --- a/include/guis/gui_cheats.hpp +++ b/include/guis/gui_cheats.hpp @@ -109,6 +109,7 @@ class GuiCheats : public Gui u64 m_heapBaseAddr = 0x00; u64 m_mainBaseAddr = 0x00; u64 m_EditorBaseAddr = 0x00; + u64 m_BookmarkAddr = 0; u8 m_addressmod = 0; time_t m_Time1; struct helperinfo_t diff --git a/source/guis/gui_cheats.cpp b/source/guis/gui_cheats.cpp index f7eecfc0..c5b1737a 100644 --- a/source/guis/gui_cheats.cpp +++ b/source/guis/gui_cheats.cpp @@ -1603,14 +1603,14 @@ void GuiCheats::onInput(u32 kdown) bookmark.type = m_searchType; Gui::requestKeyboardInput("Enter Label", "Enter Label to add to bookmark .", "", SwkbdType_QWERTY, bookmark.label, 18); - if (address >= m_memoryDump->getDumpInfo().heapBaseAddress && address < (m_memoryDump->getDumpInfo().heapBaseAddress + m_memoryDump->getDumpInfo().heapSize)) + if (address >= m_heapBaseAddr && address < m_heapEnd) { - bookmark.offset = address - m_memoryDump->getDumpInfo().heapBaseAddress; + bookmark.offset = address - m_heapBaseAddr; bookmark.heap = true; } - else if (address >= m_memoryDump->getDumpInfo().mainBaseAddress && address < (m_memoryDump->getDumpInfo().mainBaseAddress + m_memoryDump->getDumpInfo().mainSize)) + else if (address >= m_mainBaseAddr && address < m_mainend) { - bookmark.offset = address - m_memoryDump->getDumpInfo().mainBaseAddress; + bookmark.offset = address - m_mainBaseAddr; bookmark.heap = false; } @@ -1630,6 +1630,7 @@ void GuiCheats::onInput(u32 kdown) if (kdown & KEY_RSTICK && m_memoryDump->getDumpInfo().dumpType == DumpType::ADDR) { m_memoryDump->getData((m_selectedEntry + m_addresslist_offset) * sizeof(u64), &m_EditorBaseAddr, sizeof(u64)); + m_BookmarkAddr = m_EditorBaseAddr; m_AttributeDumpBookmark->getData((m_selectedEntry + m_addresslist_offset) * sizeof(bookmark_t), &m_bookmark, sizeof(bookmark_t)); m_searchMenuLocation = SEARCH_editRAM; m_selectedEntry = (m_EditorBaseAddr % 16) / 4 + 11; @@ -2162,14 +2163,14 @@ void GuiCheats::onInput(u32 kdown) u64 address = m_EditorBaseAddr - (m_EditorBaseAddr % 16) - 0x20 + (m_selectedEntry - 1 - (m_selectedEntry / 5)) * 4 + m_addressmod; bookmark_t bookmark; - if (address >= m_memoryDump->getDumpInfo().heapBaseAddress && address < (m_memoryDump->getDumpInfo().heapBaseAddress + m_memoryDump->getDumpInfo().heapSize)) + if (address >= m_heapBaseAddr && address < m_heapEnd) { - bookmark.offset = address - m_memoryDump->getDumpInfo().heapBaseAddress; + bookmark.offset = address - m_heapBaseAddr; bookmark.heap = true; } - else if (address >= m_memoryDump->getDumpInfo().mainBaseAddress && address < (m_memoryDump->getDumpInfo().mainBaseAddress + m_memoryDump->getDumpInfo().mainSize)) + else if (address >= m_mainBaseAddr && address < m_mainend) { - bookmark.offset = address - m_memoryDump->getDumpInfo().mainBaseAddress; + bookmark.offset = address - m_mainBaseAddr; bookmark.heap = false; } @@ -2179,7 +2180,8 @@ void GuiCheats::onInput(u32 kdown) m_memoryDumpBookmark->addData((u8 *)&address, sizeof(u64)); if (m_bookmark.pointer.depth > 0) { - s64 offset = address - m_EditorBaseAddr + m_bookmark.pointer.offset[0]; + s64 offset = address - m_BookmarkAddr + m_bookmark.pointer.offset[0]; + // printf("address = %lx m_EditorBaseAddr = %lx m_bookmark.pointer.offset[0] = %lx m_addressmod = %lx\n", address, m_EditorBaseAddr, m_bookmark.pointer.offset[0],m_addressmod); if (offset >= 0 && offset < (s64)m_max_range) { memcpy(&(bookmark.pointer), &(m_bookmark.pointer), (m_bookmark.pointer.depth + 2) * 8);