mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-27 18:30:56 +00:00
Add a check in OnImportCheat to avoid crashing when can not get the title from cheat.db
This commit is contained in:
parent
59bd524c90
commit
a1191325e1
@ -198,7 +198,8 @@ UI::EventReturn CwCheatScreen::OnImportCheat(UI::EventParams ¶ms)
|
||||
getline(is, title2);
|
||||
is.close();
|
||||
os.open(activeCheatFile.c_str(), std::ios::app);
|
||||
if (title2.substr(0, 2) != "_S") {
|
||||
auto it = title.begin();
|
||||
if (title2.substr(0, 2) != "_S" && it != title.end() && (++it) != title.end()) {
|
||||
os << title[0] << "\n" << title[1];
|
||||
}
|
||||
if (newList.size() != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user