Преглед изворни кода

kernel/svc: Amend returned error code for invalid priorities in CreateThread

Like with the previous change, the kernel doesn't return NOT_AUTHORIZED
here. It returns INVALID_THREAD_PRIORITY.
Lioncash пре 7 година
родитељ
комит
fcf8f53a63
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/hle/kernel/svc.cpp

+ 1 - 1
src/core/hle/kernel/svc.cpp

@@ -746,7 +746,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
     auto* const current_process = Core::CurrentProcess();
     const ResourceLimit& resource_limit = current_process->GetResourceLimit();
     if (resource_limit.GetMaxResourceValue(ResourceType::Priority) > priority) {
-        return ERR_NOT_AUTHORIZED;
+        return ERR_INVALID_THREAD_PRIORITY;
     }
 
     if (processor_id == THREADPROCESSORID_DEFAULT) {