Skip to content

Commit

Permalink
Merge pull request #159 from mchesser/zero-length-sysex
Browse files Browse the repository at this point in the history
Handle zero-length SYSEX messages
  • Loading branch information
pgrawehr authored Nov 26, 2023
2 parents e130f9b + 96c7ed1 commit 6a8beb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ConfigurableFirmata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ int FirmataClass::available(void)
*/
void FirmataClass::processSysexMessage(void)
{
if (sysexBytesRead == 0) {
return;
}

switch (storedInputData[0]) { //first byte in buffer is command
case REPORT_FIRMWARE:
printFirmwareVersion();
Expand Down

0 comments on commit 6a8beb3

Please sign in to comment.