Fix 4.0-7767 regression: exception when handling short WAD IDs

This commit is contained in:
JosJuice 2015-09-19 09:23:52 +02:00
parent 3f56480903
commit e2e7fc9029
1 changed files with 2 additions and 2 deletions

View File

@ -139,8 +139,8 @@ GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_m
std::string game_id = m_UniqueID;
// Ignore publisher ID for WAD files
if (m_Platform == DiscIO::IVolume::WII_WAD)
game_id.erase(game_id.size() - 2);
if (m_Platform == DiscIO::IVolume::WII_WAD && game_id.size() > 4)
game_id.erase(4);
auto end = custom_titles.end();
auto it = custom_titles.find(game_id);