mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
MidiMessage - fix for reported length of sysexes by message constructor.
This commit is contained in:
parent
14cb377f77
commit
484bcf4e3c
1 changed files with 3 additions and 4 deletions
|
|
@ -201,11 +201,8 @@ MidiMessage::MidiMessage (const void* srcData, int sz, int& numBytesUsed, const
|
|||
break; // bytes, assume it's the end of the sysex
|
||||
|
||||
++numVariableLengthSysexBytes;
|
||||
++d;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! haveReadAllLengthBytes)
|
||||
else if (! haveReadAllLengthBytes)
|
||||
{
|
||||
haveReadAllLengthBytes = true;
|
||||
++numVariableLengthSysexBytes;
|
||||
|
|
@ -220,6 +217,8 @@ MidiMessage::MidiMessage (const void* srcData, int sz, int& numBytesUsed, const
|
|||
allocatedData.malloc (size);
|
||||
*allocatedData = (uint8) byte;
|
||||
memcpy (allocatedData + 1, src, (size_t) (size - 1));
|
||||
|
||||
numBytesUsed += numVariableLengthSysexBytes; // (these aren't counted in the size)
|
||||
}
|
||||
else if (byte == 0xff)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue