From b18854555a32bfb8974d838d3a27c0c86471fccb Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 18 Apr 2018 21:08:38 -0600 Subject: [PATCH] IPC: Fix incorrect parsing of X descriptor addresses --- nx/include/switch/kernel/ipc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx/include/switch/kernel/ipc.h b/nx/include/switch/kernel/ipc.h index 36290f06..2f3b1fcb 100644 --- a/nx/include/switch/kernel/ipc.h +++ b/nx/include/switch/kernel/ipc.h @@ -371,7 +371,7 @@ static inline Result ipcParse(IpcParsedCommand* r) { IpcStaticSendDescriptor* desc = (IpcStaticSendDescriptor*) buf; u64 packed = (u64) desc->Packed; - r->Statics[i] = (void*) (desc->Addr | ((packed & 15) << 32) | (((packed >> 6) & 15) << 36)); + r->Statics[i] = (void*) (desc->Addr | (((packed >> 12) & 15) << 32) | (((packed >> 6) & 15) << 36)); r->StaticSizes[i] = packed >> 16; r->StaticIndices[i] = packed & 63; }