From b4242633ad542f1f442e825c7ad426f05d703e40 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 30 Dec 2018 21:27:30 -0500 Subject: 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. --- src/core/hle/kernel/svc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') 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 } if (priority > THREADPRIO_LOWEST) { - LOG_ERROR(Kernel_SVC, "An invalid priority was specified, expected {} but got {}", - THREADPRIO_LOWEST, priority); + LOG_ERROR(Kernel_SVC, + "Invalid thread priority specified ({}). Must be within the range 0-64", + priority); return ERR_INVALID_THREAD_PRIORITY; } -- cgit v1.2.3