We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee94310 commit fb06176Copy full SHA for fb06176
src/Packet.cpp
@@ -143,7 +143,7 @@ uint8_t Packet::parse(uint8_t recChar, bool valid)
143
144
case find_payload_len: ////////////////////////////////////////
145
{
146
- if (recChar <= MAX_PACKET_SIZE)
+ if ((recChar > 0) && (recChar <= MAX_PACKET_SIZE))
147
148
bytesToRec = recChar;
149
state = find_payload;
0 commit comments