mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 18:55:29 +00:00
[hac] Prevented a segfault when generating SysCall kernel caps.
This commit is contained in:
parent
91468ede5b
commit
8a60ee94ae
|
@ -54,7 +54,7 @@ void nn::hac::SystemCallHandler::exportKernelCapabilityList(fnd::List<KernelCapa
|
||||||
if (isSet() == false)
|
if (isSet() == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fnd::List<SystemCallEntry> entries;
|
SystemCallEntry entries[kSyscallTotalEntryNum];
|
||||||
for (size_t i = 0; i < kSyscallTotalEntryNum; i++)
|
for (size_t i = 0; i < kSyscallTotalEntryNum; i++)
|
||||||
{
|
{
|
||||||
entries[i].setSystemCallUpperBits((uint32_t)i);
|
entries[i].setSystemCallUpperBits((uint32_t)i);
|
||||||
|
@ -71,7 +71,7 @@ void nn::hac::SystemCallHandler::exportKernelCapabilityList(fnd::List<KernelCapa
|
||||||
entries[mSystemCalls[i] / 24].setSystemCallLowerBits(entries[mSystemCalls[i] / 24].getSystemCallLowerBits() | BIT(mSystemCalls[i] % 24));
|
entries[mSystemCalls[i] / 24].setSystemCallLowerBits(entries[mSystemCalls[i] / 24].getSystemCallLowerBits() | BIT(mSystemCalls[i] % 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < entries.size(); i++)
|
for (size_t i = 0; i < kSyscallTotalEntryNum; i++)
|
||||||
{
|
{
|
||||||
if (entries[i].getSystemCallLowerBits() != 0)
|
if (entries[i].getSystemCallLowerBits() != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue