Commit c347af5c authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

mciseq: The code can only handle up to 128 MIDI tracks.

parent 4c4a0875
......@@ -488,10 +488,10 @@ static DWORD MIDI_mciReadMThd(WINE_MCIMIDI* wmm, DWORD dwOffset)
return MCIERR_INVALID_FILE;
}
if (wmm->nTracks & 0x8000) {
/* this shouldn't be a problem... */
WARN("Ouch !! Implementation limitation to 32k tracks per MIDI file is overflowed\n");
wmm->nTracks = 0x7FFF;
if (wmm->nTracks > 0x80) {
/* wTrackNr is 7 bits only */
FIXME("Truncating MIDI file with %u tracks\n", wmm->nTracks);
wmm->nTracks = 0x80;
}
if ((wmm->tracks = HeapAlloc(GetProcessHeap(), 0, sizeof(MCI_MIDITRACK) * wmm->nTracks)) == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment