diff --git a/ChangeLog.txt b/ChangeLog.txt index 9c6c5e6b..5f299bf2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,8 +3,11 @@ Client library: - Fix _mosquitto_socketpair() on Windows, reducing the chance of delays when - publishing. Closes #484693. + publishing. Closes #483979. +Clients: +- Fix "mosquitto_pub -l" stripping the final character on a line. Closes + #483981. 1.4.5 - 20151108 ================ diff --git a/client/pub_client.c b/client/pub_client.c index 5fc27ca0..c8ca981a 100644 --- a/client/pub_client.c +++ b/client/pub_client.c @@ -392,7 +392,7 @@ int main(int argc, char *argv[]) buf_len_actual = strlen(buf); if(buf[buf_len_actual-1] == '\n'){ buf[buf_len_actual-1] = '\0'; - rc2 = mosquitto_publish(mosq, &mid_sent, topic, buf_len_actual, buf, qos, retain); + rc2 = mosquitto_publish(mosq, &mid_sent, topic, buf_len_actual-1, buf, qos, retain); if(rc2){ if(!quiet) fprintf(stderr, "Error: Publish returned %d, disconnecting.\n", rc2); mosquitto_disconnect(mosq);