1
0
Fork 0
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:
jules 2013-11-02 17:09:43 +00:00
parent 14cb377f77
commit 484bcf4e3c

View file

@ -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)
{