PollSema: don't allow values <= 0.

This commit is contained in:
Unknown W. Brackets committed 2012-11-16 01:41:54 -08:00
1 parent 71e57043e8
commit 8517fbe761
1 file changed
+3
+3
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)