Skip to content

Commit

Permalink
Clients: Fix config files truncating options after the first space.
Browse files Browse the repository at this point in the history
Closes #2059. Thanks to Jason White.
  • Loading branch information
ralight committed Feb 3, 2021
1 parent 628c5d5 commit 6413840
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.txt
Expand Up @@ -19,6 +19,7 @@ Client library:
Clients:
- mosquitto_sub will now quit with an error if the %U option is used on
Windows, rather than just quitting. Closes #1908.
- Fix config files truncating options after the first space. Closes #2059.

Apps:
- Perform stricter parsing of input username in mosquitto_passwd. Closes
Expand Down
2 changes: 1 addition & 1 deletion client/client_shared.c
Expand Up @@ -299,7 +299,7 @@ int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char *
* program name as the first entry. */
args[1] = strtok(line, " ");
if(args[1]){
args[2] = strtok(NULL, " ");
args[2] = strtok(NULL, "");
if(args[2]){
count = 3;
}else{
Expand Down

0 comments on commit 6413840

Please sign in to comment.