Make svcCreateThread panic with invalid IDs
This commit is contained in:
@@ -389,10 +389,8 @@ void Kernel::createThread() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id < -2 && id > 3) {
|
if (id < -2 || id > 3) {
|
||||||
Helpers::warn("Invalid processor ID in CreateThread");
|
Helpers::panic("Invalid processor ID in CreateThread");
|
||||||
// TODO: This should return an error
|
|
||||||
id = static_cast<s32>(ProcessorID::AppCore);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
regs[0] = Result::Success;
|
regs[0] = Result::Success;
|
||||||
|
|||||||
Reference in New Issue
Block a user