Merge pull request #1138 from WeraPea/fix-ipc-dispatch

fix: pass un-split remainder as last IPC dispatch token
This commit is contained in:
DreamMaoMao 2026-07-09 08:14:08 +08:00 committed by GitHub
commit fbc3e0fc68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -390,6 +390,9 @@ static void handle_command(int client_fd, const char *cmd_raw) {
while (end >= token && (*end == ' ' || *end == '\t'))
*end-- = '\0';
tokens[token_count++] = token;
if (token_count >= 5)
token = saveptr;
else
token = strtok_r(NULL, ",", &saveptr);
}