From 0ff0b3f57d2610ca7bfb4e604b272bc80e571e84 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 9 Feb 2013 18:56:34 -0800 Subject: [PATCH] Return an error for invalid priority. --- Core/HLE/sceKernelThread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 41a0aef0fc..30f303b93c 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -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.