Skip to content

Commit

Permalink
Fix rc value
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmaster authored Nov 4, 2024
1 parent 89f9fd0 commit a738a73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MQTTPacket/src/MQTTPacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a738a73

Please sign in to comment.