From 34293d07c1739d45588f30dacd4b3badd93efc54 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 4 Dec 2018 09:24:04 +0000 Subject: [PATCH] Always print leading zeros in mosquitto_sub when output format is hex. Closes #1066. Thanks to skiizo. Bug: https://github.com/eclipse/mosquitto/issues/1066 --- ChangeLog.txt | 8 ++++++++ client/sub_client_output.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index cc35d767..d6942a0d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,11 @@ +1.5.5 - 201812xx +================ + +Client: +- Always print leading zeros in mosquitto_sub when output format is hex. + Closes #1066. + + 1.5.4 - 20181108 ================ diff --git a/client/sub_client_output.c b/client/sub_client_output.c index ab3f5e96..4aeb8c39 100644 --- a/client/sub_client_output.c +++ b/client/sub_client_output.c @@ -85,11 +85,11 @@ static void write_payload(const unsigned char *payload, int payloadlen, int hex) (void)fwrite(payload, 1, payloadlen, stdout); }else if(hex == 1){ for(i=0; i