Skip to content

Commit

Permalink
fix a crashing bug when new cheats were added from database in expert…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
tomvita committed Jun 16, 2021
1 parent 7997617 commit 29df90e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define VERSION_STRING "3.8.17"
#define VERSION_STRING "3.8.18"
12 changes: 10 additions & 2 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ GuiCheats::GuiCheats() : Gui()
printf("num_modules = %x, proc_module->base_address = %lx , pid = %ld, rc = %x\n ", num_modules, proc_module->base_address, m_debugger->getRunningApplicationPID(), rc);
metadata.main_nso_extents.base = proc_module->base_address;
metadata.main_nso_extents.size = proc_module->size;
Handle proc_h;
Handle proc_h;
pmdmntAtmosphereGetProcessInfo(&proc_h, m_debugger->getRunningApplicationPID());
rc = svcGetInfo(&metadata.heap_extents.base, InfoType_HeapRegionAddress, proc_h, 0);
// printf("metadata.heap_extents.base = %lx rc = %x\n", metadata.heap_extents.base, rc);
Expand Down Expand Up @@ -8138,7 +8138,7 @@ void GuiCheats::_moveLonelyCheats(u8 *buildID, u64 titleID)
}
// else if (!Config::getConfig()->easymode)
// (new MessageBox("A new cheat has been added for this title from database. \n Please reload dmnt or restart the game.", MessageBox::OKAY))->show();
else
else if (access(realCheatPathold.str().c_str(), F_OK) == 0)
{
FILE *fp1 = fopen(realCheatPath.str().c_str(), "rb");
FILE *fp2 = fopen(realCheatPathold.str().c_str(), "rb");
Expand Down Expand Up @@ -8178,6 +8178,14 @@ void GuiCheats::_moveLonelyCheats(u8 *buildID, u64 titleID)
}
// (new MessageBox("A new cheat has been added for this title from database. \n Please reload dmnt or restart the game.", MessageBox::OKAY))->show();
}
else {
if (loadcheatsfromfile())
(new MessageBox("A new cheat file has been added for this title. \n You can use it now.", MessageBox::OKAY))->show();
else
(new MessageBox("A new cheat file has been added for this title. \n But there is parsing error please check file for error.", MessageBox::OKAY))->show();
// (new MessageBox("A new cheat has been added for this title. \n Please restart the game to start using it.", MessageBox::OKAY))->show();
reloadcheats();
}
}
else
{
Expand Down

0 comments on commit 29df90e

Please sign in to comment.