mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:51:11 +00:00
mciseq: The code can only handle up to 128 MIDI tracks.
This commit is contained in:
parent
4c4a0875da
commit
c347af5c67
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue