mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
commit
5d6fb5a56b
2 changed files with 11 additions and 6 deletions
|
@ -75,7 +75,12 @@ bool vfsLocalFile::Create(const std::string& path)
|
||||||
if(m != '/' && m != '\\' && !rExists(path)) // ???
|
if(m != '/' && m != '\\' && !rExists(path)) // ???
|
||||||
{
|
{
|
||||||
rFile f;
|
rFile f;
|
||||||
return f.Create(path);
|
if (!f.Create(path)) {
|
||||||
|
LOG_NOTICE(HLE, "vfsLocalFile::Create: couldn't create file");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -215,11 +215,11 @@ void getSaveDataStat(SaveDataEntry entry, vm::ptr<CellSaveDataStatGet> statGet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix the crash
|
statGet->fileList = vm::ptr<CellSaveDataFileStat>::make((u32)Memory.Alloc(sizeof(CellSaveDataFileStat) * fileEntries.size(), 8));
|
||||||
// statGet's fileList doesn't seem to be initiliazed properly, when called by cellSaveDataAutoSave2, thus causing a crash during memcpy.
|
for (u32 i = 0; i < fileEntries.size(); i++) {
|
||||||
statGet->fileList = vm::bptr<CellSaveDataFileStat>::make(be_t<u32>::make((u32)Memory.Alloc(sizeof(CellSaveDataFileStat) * (u32)fileEntries.size(), sizeof(CellSaveDataFileStat))));
|
CellSaveDataFileStat *dst = &statGet->fileList[i];
|
||||||
for (u32 i = 0; i < fileEntries.size(); i++)
|
memcpy(dst, &fileEntries[i], sizeof(CellSaveDataFileStat));
|
||||||
memcpy(&statGet->fileList[i], &fileEntries[i], sizeof(CellSaveDataFileStat));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 modifySaveDataFiles(vm::ptr<CellSaveDataFileCallback> funcFile, vm::ptr<CellSaveDataCBResult> result, const std::string& saveDataDir)
|
s32 modifySaveDataFiles(vm::ptr<CellSaveDataFileCallback> funcFile, vm::ptr<CellSaveDataCBResult> result, const std::string& saveDataDir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue