mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-03 19:47:59 +00:00
Add ERROR_LOG for invalid id and timestamps
This commit is contained in:
parent
9ac8c63d96
commit
451797af92
@ -764,8 +764,9 @@ u32 scePsmfGetEPWithId(u32 psmfStruct, int epid, u32 entryAddr)
|
||||
return ERROR_PSMF_NOT_FOUND;
|
||||
}
|
||||
DEBUG_LOG(ME, "scePsmfGetEPWithId(%08x, %i, %08x)", psmfStruct, epid, entryAddr);
|
||||
|
||||
if (epid < 0 || epid >= (int)psmf->EPMap.size()) {
|
||||
// TODO: Just a guess.
|
||||
ERROR_LOG(ME, "scePsmfGetEPidWithTimestamp(%08x, %i): invalid id", psmfStruct, epid);
|
||||
return ERROR_PSMF_INVALID_ID;
|
||||
}
|
||||
if (Memory::IsValidAddress(entryAddr)) {
|
||||
@ -782,13 +783,15 @@ u32 scePsmfGetEPWithTimestamp(u32 psmfStruct, u32 ts, u32 entryAddr)
|
||||
return ERROR_PSMF_NOT_FOUND;
|
||||
}
|
||||
DEBUG_LOG(ME, "scePsmfGetEPWithTimestamp(%08x, %i, %08x)", psmfStruct, ts, entryAddr);
|
||||
|
||||
if (ts < psmf->presentationStartTime) {
|
||||
ERROR_LOG(ME, "scePsmfGetEPidWithTimestamp(%08x, %i): invalid timestamp", psmfStruct, ts);
|
||||
return ERROR_PSMF_INVALID_TIMESTAMP;
|
||||
}
|
||||
|
||||
int epid = psmf->FindEPWithTimestamp(ts);
|
||||
if (epid < 0 || epid >= (int)psmf->EPMap.size()) {
|
||||
// TODO: Just a guess.
|
||||
ERROR_LOG(ME, "scePsmfGetEPidWithTimestamp(%08x, %i): invalid id", psmfStruct, epid);
|
||||
return ERROR_PSMF_INVALID_ID;
|
||||
}
|
||||
|
||||
@ -806,13 +809,15 @@ u32 scePsmfGetEPidWithTimestamp(u32 psmfStruct, u32 ts)
|
||||
return ERROR_PSMF_NOT_FOUND;
|
||||
}
|
||||
DEBUG_LOG(ME, "scePsmfGetEPidWithTimestamp(%08x, %i)", psmfStruct, ts);
|
||||
|
||||
if (ts < psmf->presentationStartTime) {
|
||||
ERROR_LOG(ME, "scePsmfGetEPidWithTimestamp(%08x, %i): invalid timestamp", psmfStruct, ts);
|
||||
return ERROR_PSMF_INVALID_TIMESTAMP;
|
||||
}
|
||||
|
||||
int epid = psmf->FindEPWithTimestamp(ts);
|
||||
if (epid < 0 || epid >= (int)psmf->EPMap.size()) {
|
||||
// TODO: Just a guess.
|
||||
ERROR_LOG(ME, "scePsmfGetEPidWithTimestamp(%08x, %i): invalid id", psmfStruct, epid);
|
||||
return ERROR_PSMF_INVALID_ID;
|
||||
}
|
||||
return epid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user