summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-12-30 21:27:30 -0500
committerGravatar Lioncash2018-12-30 21:29:38 -0500
commitb4242633ad542f1f442e825c7ad426f05d703e40 (patch)
tree2af2a13b9fd5c91bbb2d53119893a377d7e2b3d0 /src/core/hle/kernel/svc.cpp
parentkernel/svc: Sanitize core number and thread priorities in CreateThread() (diff)
downloadyuzu-b4242633ad542f1f442e825c7ad426f05d703e40.tar.gz
yuzu-b4242633ad542f1f442e825c7ad426f05d703e40.tar.xz
yuzu-b4242633ad542f1f442e825c7ad426f05d703e40.zip
kernel/svc: Correct misleading error message within CreateThread()
This is a bounds check to ensure that the thread priority is within the valid range of 0-64. If it exceeds 64, that doesn't necessarily mean that an actual priority of 64 was expected (it actually means whoever called the function screwed up their math). Instead clarify the message to indicate the allowed range of thread priorities.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index ada05abd2..6588bd3b8 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1239,8 +1239,9 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
1239 } 1239 }
1240 1240
1241 if (priority > THREADPRIO_LOWEST) { 1241 if (priority > THREADPRIO_LOWEST) {
1242 LOG_ERROR(Kernel_SVC, "An invalid priority was specified, expected {} but got {}", 1242 LOG_ERROR(Kernel_SVC,
1243 THREADPRIO_LOWEST, priority); 1243 "Invalid thread priority specified ({}). Must be within the range 0-64",
1244 priority);
1244 return ERR_INVALID_THREAD_PRIORITY; 1245 return ERR_INVALID_THREAD_PRIORITY;
1245 } 1246 }
1246 1247