fix: pass un-split remainder as last IPC dispatch token

This commit is contained in:
werapi 2026-05-30 20:02:03 +02:00 committed by DreamMaoMao
parent 84f26513b0
commit 6b9cf54f21

View file

@ -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};