From a738a73f99aa9b5bbef8f32115d9071ed9f8691e Mon Sep 17 00:00:00 2001 From: Jacob Brunson Date: Mon, 4 Nov 2024 08:40:43 -0700 Subject: [PATCH] Fix rc value --- MQTTPacket/src/MQTTPacket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MQTTPacket/src/MQTTPacket.c b/MQTTPacket/src/MQTTPacket.c index c1bb2d4..9ab6cf5 100644 --- a/MQTTPacket/src/MQTTPacket.c +++ b/MQTTPacket/src/MQTTPacket.c @@ -94,11 +94,11 @@ int32_t MQTTPacket_VBIlen(int32_t rem_len) /* now remaining_length field */ if (rem_len < NUM_OF_DIGITS_1) - rem_len += 1; + rc += 1; else if (rem_len < NUM_OF_DIGITS_2) - rem_len += 2; + rc += 2; else if (rem_len < NUM_OF_DIGITS_3) - rem_len += 3; + rc += 3; else rc = 4; return rc;