fix crash when trying to send MMC of timecode > 255 hours
authorRobin Gareus <robin@gareus.org>
Tue, 10 Jun 2014 01:18:05 +0000 (03:18 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 10 Jun 2014 01:18:05 +0000 (03:18 +0200)
libs/midi++2/mmc.cc

index b92e686ce6b753bca71bea99b2b2be0b5fa70c98..c34304dd0848c4ebe95bfc5105585da38d0e8eb7 100644 (file)
@@ -710,7 +710,7 @@ MachineControlCommand::fill_buffer (MachineControl* mmc, MIDI::byte* b) const
        if (_command == MachineControl::cmdLocate) {
                *b++ = 0x6; // byte count
                *b++ = 0x1; // "TARGET" subcommand
-               *b++ = _time.hours;
+               *b++ = _time.hours & 0xff;
                *b++ = _time.minutes;
                *b++ = _time.seconds;
                *b++ = _time.frames;