cellGameExec: add param checks

This commit is contained in:
Megamouse 2018-06-12 21:32:40 +02:00 committed by kd-11
parent f9cab3270f
commit d4285fb196

View file

@ -15,6 +15,11 @@ s32 cellGameGetHomeDataExportPath(vm::ptr<char> exportPath)
{
cellGameExec.warning("cellGameGetHomeDataExportPath(exportPath=*0x%x)", exportPath);
if (!exportPath)
{
return CELL_GAME_ERROR_PARAM;
}
// TODO: PlayStation home is defunct.
return CELL_GAME_ERROR_NOAPP;
@ -30,6 +35,11 @@ s32 cellGameGetHomeDataImportPath(vm::ptr<char> importPath)
{
cellGameExec.warning("cellGameGetHomeDataImportPath(importPath=*0x%x)", importPath);
if (!importPath)
{
return CELL_GAME_ERROR_PARAM;
}
// TODO: PlayStation home is defunct.
return CELL_GAME_ERROR_NOAPP;
@ -39,6 +49,11 @@ s32 cellGameGetHomeLaunchOptionPath(vm::ptr<char> commonPath, vm::ptr<char> pers
{
cellGameExec.todo("cellGameGetHomeLaunchOptionPath(commonPath=%s, personalPath=%s)", commonPath, personalPath);
if (!commonPath || !personalPath)
{
return CELL_GAME_ERROR_PARAM;
}
// TODO: PlayStation home is not supported atm.
return CELL_GAME_ERROR_NOAPP;
}
@ -47,6 +62,11 @@ s32 cellGameGetBootGameInfo(vm::ptr<u32> type, vm::ptr<char> dirName, vm::ptr<u3
{
cellGameExec.todo("cellGameGetBootGameInfo(type=*0x%x, dirName=%s, execdata=*0x%x)", type, dirName, execdata);
if (!type || !dirName) // execdata can be NULL
{
return CELL_GAME_ERROR_PARAM;
}
// TODO: Support more boot types
*type = CELL_GAME_GAMETYPE_SYS;