Skip to content

Commit 9f26593

Browse files
committed
typo
1 parent 0afc1ef commit 9f26593

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Command.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ void Command::execute() {
1515

1616
char variableHeaderLength = 10; // TODO const
1717

18-
// client id length needs to fix in the second byte of the connect
18+
// client id length needs to fit in the second byte of the connect
1919
// packet (remainingLength)
20-
if (mContext.clientId.size() > 255 - variableHeaderLength) {
21-
return; // TODO error handling
20+
if (mContext.clientId.size() >
21+
255 - variableHeaderLength) { // TODO can this just be moved to
22+
// earlier validation?
23+
return; // TODO error handling
2224
}
2325
char remainingLength = variableHeaderLength + mContext.clientId.size();
2426

0 commit comments

Comments
 (0)