3 Apr
2014
3 Apr
'14
10:54 a.m.
Takashi Sakamoto wrote:
len = b[0] - 0x80;
if ((len > 1) && (3 < len) && (s->midi[port]))
This condition is true only for len==2.
Oh... It's my fault. I think I did focus on device's quirk for sequence of dbc value and didn't pay enough attension to these lines...
In these lines I allow this module to pick up MIDI messages according to IEC 61883-6. 1/2/3 bytes can be transmitted. So it should be:
len = b[0] - 0x80;
if ((1 < len) && (len < 3) && (s->midi[port]))
This is still wrong. It should be:
len = b[0] - 0x80; if (1 <= len && len <= 3 && s->midi[port])
Regards, Clemens