1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-05 19:51:45 +00:00

Fix minor bugs in loader/sm

This commit is contained in:
Michael Scire 2018-05-07 07:31:36 -06:00
parent 9e558dafee
commit b346c8f375
2 changed files with 3 additions and 3 deletions

View file

@ -230,7 +230,7 @@ Result Registration::RemoveNroInfo(u64 index, Handle process_h, u64 nro_heap_add
return 0xA809; 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) { 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]; 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); 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);

View file

@ -65,11 +65,11 @@ std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is
Result rc = 0x415; Result rc = 0x415;
#ifdef SM_ENABLE_SMHAX #ifdef SM_ENABLE_SMHAX
if (!this->has_initialized) { 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 #endif
if (this->has_initialized) { 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}}; return {rc, MovedHandle{service_h}};
} }