mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-10 06:01:52 +00:00
Fix minor bugs in loader/sm
This commit is contained in:
parent
9e558dafee
commit
b346c8f375
2 changed files with 3 additions and 3 deletions
|
@ -230,7 +230,7 @@ Result Registration::RemoveNroInfo(u64 index, Handle process_h, u64 nro_heap_add
|
|||
return 0xA809;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < NRR_INFO_MAX; i++) {
|
||||
for (unsigned int i = 0; i < NRO_INFO_MAX; i++) {
|
||||
if (target_process->nro_infos[i].in_use && target_process->nro_infos[i].nro_heap_address == nro_heap_address) {
|
||||
NroInfo *info = &target_process->nro_infos[i];
|
||||
Result rc = svcUnmapProcessCodeMemory(process_h, info->base_address + info->text_size + info->ro_size + info->rw_size, info->bss_heap_address, info->bss_heap_size);
|
||||
|
|
|
@ -65,11 +65,11 @@ std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is
|
|||
Result rc = 0x415;
|
||||
#ifdef SM_ENABLE_SMHAX
|
||||
if (!this->has_initialized) {
|
||||
rc = Registration::RegisterServiceForPid(Registration::GetInitialProcessId(), service, max_sessions, is_light != 0, &service_h);
|
||||
rc = Registration::RegisterServiceForPid(Registration::GetInitialProcessId(), service, max_sessions, (is_light & 1) != 0, &service_h);
|
||||
}
|
||||
#endif
|
||||
if (this->has_initialized) {
|
||||
rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, is_light != 0, &service_h);
|
||||
rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, (is_light & 1) != 0, &service_h);
|
||||
}
|
||||
return {rc, MovedHandle{service_h}};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue