mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-03 06:32:10 +00:00
Use a PSPPointer in the FILELIST savedata mode.
This commit is contained in:
parent
9eea30c52d
commit
5027e24150
@ -844,13 +844,13 @@ int SavedataParam::GetFilesList(SceUtilitySavedataParam *param)
|
||||
return SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_STATUS;
|
||||
}
|
||||
|
||||
if (!Memory::IsValidAddress(param->fileListAddr)) {
|
||||
ERROR_LOG_REPORT(HLE, "SavedataParam::GetFilesList(): bad fileList address %08x", param->fileListAddr);
|
||||
if (!param->fileList.Valid()) {
|
||||
ERROR_LOG_REPORT(HLE, "SavedataParam::GetFilesList(): bad fileList address %08x", param->fileList.ptr);
|
||||
// Should crash.
|
||||
return -1;
|
||||
}
|
||||
|
||||
auto fileList = Memory::GetStruct<SceUtilitySavedataFileListInfo>(param->fileListAddr);
|
||||
auto &fileList = param->fileList;
|
||||
if (fileList->secureEntries.Valid() && fileList->maxSecureEntries > 99) {
|
||||
ERROR_LOG_REPORT(HLE, "SavedataParam::GetFilesList(): too many secure entries, %d", fileList->maxSecureEntries);
|
||||
return SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_PARAMS;
|
||||
|
@ -186,7 +186,7 @@ struct SceUtilitySavedataParam
|
||||
u32 idListAddr;
|
||||
|
||||
// Function 12 FILES
|
||||
u32 fileListAddr;
|
||||
PSPPointer<SceUtilitySavedataFileListInfo> fileList;
|
||||
|
||||
// Function 22 GETSIZES
|
||||
u32 sizeAddr;
|
||||
|
Loading…
Reference in New Issue
Block a user