1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Make it so that TROPUSR doesn't crash on "bad" imput.

This commit is contained in:
Robbie 2017-10-30 14:13:06 -05:00 committed by kd-11
parent 47bacc0ef0
commit b8c29ae957

View File

@ -207,6 +207,7 @@ u32 TROPUSRLoader::GetTrophyUnlockState(u32 id)
if (id >= m_table6.size())
{
LOG_WARNING(LOADER, "TROPUSRLoader::GetUnlockState: Invalid id=%d", id);
return 0;
}
return m_table6[id].trophy_state; // Let's assume the trophies are stored ordered
@ -217,6 +218,7 @@ u64 TROPUSRLoader::GetTrophyTimestamp(u32 id)
if (id >= m_table6.size())
{
LOG_WARNING(LOADER, "TROPUSRLoader::GetTrophyTimestamp: Invalid id=%d", id);
return 0;
}
// TODO: What timestamp does sceNpTrophyGetTrophyInfo want, timestamp1 or timestamp2?