mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 18:40:36 +00:00
cellSysUtil: Add a few CELL_SYSUTIL_ERROR_VALUE checks
This commit is contained in:
parent
894658f14c
commit
da12969898
@ -203,6 +203,11 @@ error_code cellSysutilGetSystemParamInt(CellSysutilParamId id, vm::ptr<s32> valu
|
||||
{
|
||||
cellSysutil.warning("cellSysutilGetSystemParamInt(id=0x%x(%s), value=*0x%x)", id, id, value);
|
||||
|
||||
if (!value)
|
||||
{
|
||||
return CELL_SYSUTIL_ERROR_VALUE;
|
||||
}
|
||||
|
||||
// TODO: load this information from config (preferably "sys/" group)
|
||||
|
||||
switch (id)
|
||||
@ -272,7 +277,7 @@ error_code cellSysutilGetSystemParamInt(CellSysutilParamId id, vm::ptr<s32> valu
|
||||
break;
|
||||
|
||||
default:
|
||||
return CELL_EINVAL;
|
||||
return CELL_SYSUTIL_ERROR_VALUE;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
@ -282,6 +287,11 @@ error_code cellSysutilGetSystemParamString(CellSysutilParamId id, vm::ptr<char>
|
||||
{
|
||||
cellSysutil.trace("cellSysutilGetSystemParamString(id=0x%x(%s), buf=*0x%x, bufsize=%d)", id, id, buf, bufsize);
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
return CELL_SYSUTIL_ERROR_VALUE;
|
||||
}
|
||||
|
||||
memset(buf.get_ptr(), 0, bufsize);
|
||||
|
||||
switch (id)
|
||||
@ -295,7 +305,7 @@ error_code cellSysutilGetSystemParamString(CellSysutilParamId id, vm::ptr<char>
|
||||
break;
|
||||
|
||||
default:
|
||||
return CELL_EINVAL;
|
||||
return CELL_SYSUTIL_ERROR_VALUE;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user