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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue