diff --git a/Core/HLE/sceKernelSemaphore.cpp b/Core/HLE/sceKernelSemaphore.cpp index 30c210f0a0..e287d1b3f9 100644 --- a/Core/HLE/sceKernelSemaphore.cpp +++ b/Core/HLE/sceKernelSemaphore.cpp @@ -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(id, error); if (s)