diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2012-03-19 11:12:40 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2012-03-19 11:12:40 -0700 |
| commit | cf52029b51b994cf81346642e598cc50cda2f744 (patch) | |
| tree | 966768f4a50e93622caa2593259148e6e15da427 /Source/Core | |
| parent | ff6023df2793bf7c4ef81e90efcf0068ed3f09b8 (diff) | |
Check if the game's ID is valid before accessing it to set the ntsc u/j register. Prevents discs without a real ID from crashing dolphin.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/Boot/Boot.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 3dcbf5730c..8ef6251339 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -227,7 +227,9 @@ bool CBoot::BootUp() // setup the map from ISOFile ID VolumeHandler::SetVolumeName(_StartupPara.m_strFilename); - VideoInterface::SetRegionReg((char)VolumeHandler::GetVolume()->GetUniqueID().at(3)); + std::string unique_id = VolumeHandler::GetVolume()->GetUniqueID(); + if (unique_id.size() >= 3) + VideoInterface::SetRegionReg(unique_id.at(3)); DVDInterface::SetDiscInside(VolumeHandler::IsValid()); |
