Fix sema and event flag refer to check size.
If it's zero, write nothing, just like the others.
This commit is contained in:
parent
f649364b2d
commit
ac9e936ba8
2 changed files with 14 additions and 3 deletions
|
@ -328,7 +328,12 @@ int sceKernelReferSemaStatus(SceUID id, u32 infoPtr)
|
|||
if (s)
|
||||
{
|
||||
DEBUG_LOG(HLE, "sceKernelReferSemaStatus(%i, %08x)", id, infoPtr);
|
||||
Memory::WriteStruct(infoPtr, &s->ns);
|
||||
|
||||
if (!Memory::IsValidAddress(infoPtr))
|
||||
return -1;
|
||||
|
||||
if (Memory::Read_U32(infoPtr) != 0)
|
||||
Memory::WriteStruct(infoPtr, &s->ns);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue