From e2e7fc9029eeb4cb0c6393b1234072627b11aff9 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 19 Sep 2015 09:23:52 +0200 Subject: [PATCH] Fix 4.0-7767 regression: exception when handling short WAD IDs --- Source/Core/DolphinWX/ISOFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 28051d0fb0..82cd73fba5 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -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);