mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
cellGame: Add missing nullptr checks
if the param is null pointer, the library simply skips writing into it. also fix the order of writes.
This commit is contained in:
parent
98f2967aac
commit
43b75ccf04
@ -641,15 +641,16 @@ error_code cellGameCreateGameData(vm::ptr<CellGameSetInitParams> init, vm::ptr<c
|
|||||||
return CELL_GAME_ERROR_ACCESS_ERROR; // ???
|
return CELL_GAME_ERROR_ACCESS_ERROR; // ???
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cellGameContentPermit should then move files in non-temporary location and return their non-temporary displacement
|
||||||
|
if (tmp_contentInfoPath) strcpy_trunc(*tmp_contentInfoPath, tmp_contentInfo);
|
||||||
|
|
||||||
if (!fs::create_dir(vfs::get(tmp_usrdir)))
|
if (!fs::create_dir(vfs::get(tmp_usrdir)))
|
||||||
{
|
{
|
||||||
cellGame.error("cellGameCreateGameData(): failed to create directory '%s'", tmp_usrdir);
|
cellGame.error("cellGameCreateGameData(): failed to create directory '%s'", tmp_usrdir);
|
||||||
return CELL_GAME_ERROR_ACCESS_ERROR; // ???
|
return CELL_GAME_ERROR_ACCESS_ERROR; // ???
|
||||||
}
|
}
|
||||||
|
|
||||||
// cellGameContentPermit should then move files in non-temporary location and return their non-temporary displacement
|
if (tmp_usrdirPath) strcpy_trunc(*tmp_usrdirPath, tmp_usrdir);
|
||||||
strcpy_trunc(*tmp_contentInfoPath, tmp_contentInfo);
|
|
||||||
strcpy_trunc(*tmp_usrdirPath, tmp_usrdir);
|
|
||||||
|
|
||||||
prm->temp = vfs::get(tmp_contentInfo);
|
prm->temp = vfs::get(tmp_contentInfo);
|
||||||
cellGame.success("cellGameCreateGameData(): temporary directory '%s' has been created", tmp_contentInfo);
|
cellGame.success("cellGameCreateGameData(): temporary directory '%s' has been created", tmp_contentInfo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user