1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00

Fix UB in Emulator::Load

This commit is contained in:
Eladash 2020-08-28 00:42:46 +03:00 committed by Ani
parent 019d2d5dcf
commit 48f70fbf10

View File

@ -1442,7 +1442,8 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
if (!disc_sfo_dir.empty() && fs::is_file(disc_sfo_dir))
{
const auto bdvd_title = psf::get_string(psf::load_object(fs::file{ disc_sfo_dir }), "TITLE");
const auto psf_obj = psf::load_object(fs::file{ disc_sfo_dir });
const auto bdvd_title = psf::get_string(psf_obj, "TITLE");
if (!bdvd_title.empty() && bdvd_title != m_title)
{