From 6b9cf54f2108f52940d254562a23530d599142d7 Mon Sep 17 00:00:00 2001 From: werapi Date: Sat, 30 May 2026 20:02:03 +0200 Subject: [PATCH] fix: pass un-split remainder as last IPC dispatch token --- src/ipc/ipc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ipc/ipc.h b/src/ipc/ipc.h index af1e9c64..0963e956 100644 --- a/src/ipc/ipc.h +++ b/src/ipc/ipc.h @@ -390,7 +390,10 @@ static void handle_command(int client_fd, const char *cmd_raw) { while (end >= token && (*end == ' ' || *end == '\t')) *end-- = '\0'; tokens[token_count++] = token; - token = strtok_r(NULL, ",", &saveptr); + if (token_count >= 5) + token = saveptr; + else + token = strtok_r(NULL, ",", &saveptr); } Arg arg = {0};