From 1dfb1beafbc2ed02ea8517e8f2ffda58e1d2a883 Mon Sep 17 00:00:00 2001 From: plutoo Date: Sat, 10 Mar 2018 17:49:17 +0100 Subject: [PATCH] Ipc bugfix --- nx/include/switch/kernel/ipc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nx/include/switch/kernel/ipc.h b/nx/include/switch/kernel/ipc.h index a243d300..a5724a6f 100644 --- a/nx/include/switch/kernel/ipc.h +++ b/nx/include/switch/kernel/ipc.h @@ -346,17 +346,19 @@ static inline Result ipcParse(IpcParsedCommand* r) { size_t num_handles_move = ((ctrl2 >> 5) & 15); size_t num_handles = num_handles_copy + num_handles_move; + u32* buf_after_handles = buf + num_handles; if (num_handles > IPC_MAX_OBJECTS) num_handles = IPC_MAX_OBJECTS; for (i=0; iHandles[i] = *(buf-num_handles+i); + r->Handles[i] = *(buf+i); r->WasHandleCopied[i] = (i < num_handles_copy); } r->NumHandles = num_handles; + buf = buf_after_handles; } size_t num_statics = (ctrl0 >> 16) & 15;