Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for wrong size of message.length #337

Open
wants to merge 1 commit into
base: feat/v5.1.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/MIDI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ bool MidiInterface<Transport, Settings, Platform>::parse()
mMessage.data1 = 0;
mMessage.data2 = 0;
mMessage.valid = true;
mMessage.length = 1;

// Do not reset all input attributes, Running Status must remain unchanged.
// We still need to reset these
Expand Down Expand Up @@ -948,7 +949,7 @@ bool MidiInterface<Transport, Settings, Platform>::parse()
mMessage.channel = getChannelFromStatusByte(mPendingMessage[0]);
mMessage.data1 = mPendingMessage[1];
mMessage.data2 = 0; // Completed new message has 1 data byte
mMessage.length = 1;
mMessage.length = 2; // Shouldn't be 1, send() checks if length > 1 to send data1, thus length needs to be 2
rbarreiros marked this conversation as resolved.
Show resolved Hide resolved

mPendingMessageIndex = 0;
mPendingMessageExpectedLength = 0;
Expand Down