Fix invalid map<K, T> key error (#1801)

This commit is contained in:
raven02 2016-06-20 06:43:13 +08:00 committed by GitHub
parent 863d963e97
commit c96057296a

View File

@ -87,13 +87,14 @@ s32 cellHddGameCheck(PPUThread& ppu, u32 version, vm::cptr<char> dirName, u32 er
// TODO: Is cellHddGameCheck really responsible for writing the information in get->getParam ? (If not, delete this else)
const auto& psf = psf::load_object(fs::file(local_dir +"/PARAM.SFO"));
get->getParam.parentalLevel = psf.at("PARENTAL_LEVEL").as_integer();
get->getParam.attribute = psf.at("ATTRIBUTE").as_integer();
get->getParam.resolution = psf.at("RESOLUTION").as_integer();
get->getParam.soundFormat = psf.at("SOUND_FORMAT").as_integer();
strcpy_trunc(get->getParam.title, psf.at("TITLE").as_string());
strcpy_trunc(get->getParam.dataVersion, psf.at("APP_VER").as_string());
strcpy_trunc(get->getParam.titleId, psf.at("TITLE_ID").as_string());
// Some following fields may be zero in old FW 1.00 version PARAM.SFO
if (psf.count("PARENTAL_LEVEL") != 0) get->getParam.parentalLevel = psf.at("PARENTAL_LEVEL").as_integer();
if (psf.count("ATTRIBUTE") != 0) get->getParam.attribute = psf.at("ATTRIBUTE").as_integer();
if (psf.count("RESOLUTION") != 0) get->getParam.resolution = psf.at("RESOLUTION").as_integer();
if (psf.count("SOUND_FORMAT") != 0) get->getParam.soundFormat = psf.at("SOUND_FORMAT").as_integer();
if (psf.count("TITLE") != 0) strcpy_trunc(get->getParam.title, psf.at("TITLE").as_string());
if (psf.count("APP_VER") != 0) strcpy_trunc(get->getParam.dataVersion, psf.at("APP_VER").as_string());
if (psf.count("TITLE_ID") != 0) strcpy_trunc(get->getParam.titleId, psf.at("TITLE_ID").as_string());
for (u32 i = 0; i < CELL_HDDGAME_SYSP_LANGUAGE_NUM; i++)
{