PollSema: don't allow values <= 0.

This commit is contained in:
Unknown W. Brackets 2012-11-16 01:41:54 -08:00
parent 71e57043e8
commit 8517fbe761

View file

@ -290,6 +290,9 @@ int sceKernelPollSema(SceUID id, int wantedCount)
{
DEBUG_LOG(HLE,"sceKernelPollSema(%i, %i)", id, wantedCount);
if (wantedCount <= 0)
return SCE_KERNEL_ERROR_ILLEGAL_COUNT;
u32 error;
Semaphore *s = kernelObjects.Get<Semaphore>(id, error);
if (s)