mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 10:52:15 +02:00
Use custom error codes for Domain Message parse failures
This commit is contained in:
parent
e3015307c8
commit
9b1add926c
@ -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];
|
||||
|
@ -72,6 +72,8 @@ enum {
|
||||
LibnxError_IncompatSysVer,
|
||||
LibnxError_InitFail_Time,
|
||||
LibnxError_TooManyDevOpTabs,
|
||||
LibnxError_DomainMessageUnknownType,
|
||||
LibnxError_DomainMessageTooManyObjectIds,
|
||||
};
|
||||
|
||||
/// libnx nvidia error codes
|
||||
|
Loading…
Reference in New Issue
Block a user