Explorar o código

svc: Return ERR_INVALID_PROCESSOR_ID in CreateThread() if an invalid processor ID is given

This is what the kernel does for an out-of-range processor ID.
Lioncash %!s(int64=7) %!d(string=hai) anos
pai
achega
fbe462099b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/core/hle/kernel/svc.cpp

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

@@ -544,8 +544,8 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
     case THREADPROCESSORID_3:
     case THREADPROCESSORID_3:
         break;
         break;
     default:
     default:
-        ASSERT_MSG(false, "Unsupported thread processor ID: {}", processor_id);
-        break;
+        LOG_ERROR(Kernel_SVC, "Invalid thread processor ID: {}", processor_id);
+        return ERR_INVALID_PROCESSOR_ID;
     }
     }
 
 
     auto& kernel = Core::System::GetInstance().Kernel();
     auto& kernel = Core::System::GetInstance().Kernel();