Merge pull request #3065 from JosJuice/wad-id-exception

Fix 4.0-7767 regression: exception when handling short WAD IDs
This commit is contained in:
Markus Wick 2015-09-19 13:49:21 +02:00
commit 1c502b76a5
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);