mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
Make svcCreateThread panic with invalid IDs
This commit is contained in:
parent
6895a1d9d6
commit
5b8bb12860
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue