Return an error for invalid priority.

This commit is contained in:
Unknown W. Brackets 2013-02-09 18:56:34 -08:00
parent 161f2d712e
commit 0ff0b3f57d

View file

@ -1609,6 +1609,9 @@ int sceKernelRotateThreadReadyQueue(int priority)
if (priority == 0)
priority = cur->nt.currentPriority;
if (priority <= 0x07 || priority > 0x77)
return SCE_KERNEL_ERROR_ILLEGAL_PRIORITY;
if (!threadReadyQueue[priority].empty())
{
// In other words, yield to everyone else.