mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix error handling for setting alarms.
This commit is contained in:
parent
33debd755b
commit
522b16bb89
1 changed files with 3 additions and 1 deletions
|
@ -104,6 +104,9 @@ SceUID __KernelSetAlarm(u64 ticks, u32 handlerPtr, u32 commonPtr)
|
|||
if (!alarmInitComplete)
|
||||
__KernelAlarmInit();
|
||||
|
||||
if (!Memory::IsValidAddress(handlerPtr))
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_ADDR;
|
||||
|
||||
Alarm *alarm = new Alarm;
|
||||
SceUID uid = kernelObjects.Create(alarm);
|
||||
|
||||
|
@ -131,7 +134,6 @@ SceUID sceKernelSetSysClockAlarm(u32 microPtr, u32 handlerPtr, u32 commonPtr)
|
|||
|
||||
if (Memory::IsValidAddress(microPtr))
|
||||
micro = Memory::Read_U64(microPtr);
|
||||
// TODO: What to do when invalid?
|
||||
else
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue