diff --git a/nx/include/switch/kernel/ipc.h b/nx/include/switch/kernel/ipc.h index bbe195c9..49d28f35 100644 --- a/nx/include/switch/kernel/ipc.h +++ b/nx/include/switch/kernel/ipc.h @@ -636,12 +636,12 @@ static inline Result ipcParseForDomain(IpcParsedCommand* r) { case DomainMessageType_Close: break; default: - return 0x1A60A; + return MAKERESULT(Module_Libnx, LibnxError_DomainMessageUnknownType); } r->ThisObjectId = hdr->ThisObjectId; r->NumObjectIds = hdr->NumObjectIds > 8 ? 8 : hdr->NumObjectIds; if ((uintptr_t)object_ids + sizeof(u32) * r->NumObjectIds - (uintptr_t)armGetTls() >= 0x100) { - return 0x1D60A; + return MAKERESULT(Module_Libnx, LibnxError_DomainMessageTooManyObjectIds); } for(size_t i = 0; i < r->NumObjectIds; i++) r->ObjectIds[i] = object_ids[i]; diff --git a/nx/include/switch/result.h b/nx/include/switch/result.h index 1f8f43fd..a48711bc 100644 --- a/nx/include/switch/result.h +++ b/nx/include/switch/result.h @@ -72,6 +72,8 @@ enum { LibnxError_IncompatSysVer, LibnxError_InitFail_Time, LibnxError_TooManyDevOpTabs, + LibnxError_DomainMessageUnknownType, + LibnxError_DomainMessageTooManyObjectIds, }; /// libnx nvidia error codes