mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-10 00:07:25 -04:00
fix: pass un-split remainder as last IPC dispatch token
This commit is contained in:
parent
84f26513b0
commit
6b9cf54f21
1 changed files with 4 additions and 1 deletions
|
|
@ -390,6 +390,9 @@ static void handle_command(int client_fd, const char *cmd_raw) {
|
||||||
while (end >= token && (*end == ' ' || *end == '\t'))
|
while (end >= token && (*end == ' ' || *end == '\t'))
|
||||||
*end-- = '\0';
|
*end-- = '\0';
|
||||||
tokens[token_count++] = token;
|
tokens[token_count++] = token;
|
||||||
|
if (token_count >= 5)
|
||||||
|
token = saveptr;
|
||||||
|
else
|
||||||
token = strtok_r(NULL, ",", &saveptr);
|
token = strtok_r(NULL, ",", &saveptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue