author | erik <erik> | 2007-01-31 22:21:38 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-31 22:21:38 (UTC) |
commit | ed5fba8cdb27174427b2e7780508bafa05536ca1 (patch) (side-by-side diff) | |
tree | 9dca5bd75617c8f18ba066bbd90ef88dc2473d84 /core/multimedia/opieplayer/modplug/load_mdl.cpp | |
parent | 9395cf2a65184e493714c699bb23b02ea31feef5 (diff) | |
download | opie-ed5fba8cdb27174427b2e7780508bafa05536ca1.zip opie-ed5fba8cdb27174427b2e7780508bafa05536ca1.tar.gz opie-ed5fba8cdb27174427b2e7780508bafa05536ca1.tar.bz2 |
A few files that have dynamically allocated arrays that are not properly
de-allocated (forgot to use []).
Diffstat (limited to 'core/multimedia/opieplayer/modplug/load_mdl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/modplug/load_mdl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/modplug/load_mdl.cpp b/core/multimedia/opieplayer/modplug/load_mdl.cpp index 806b68b..e1f78d5 100644 --- a/core/multimedia/opieplayer/modplug/load_mdl.cpp +++ b/core/multimedia/opieplayer/modplug/load_mdl.cpp @@ -216,65 +216,65 @@ BOOL CSoundFile::ReadMDL(const BYTE *lpStream, DWORD dwMemLength) { if (dwMemPos == 11) return FALSE; break; } switch(block) { // IN: infoblock case 0x4E49: pmib = (MDLINFOBLOCK *)(lpStream+dwMemPos); memcpy(m_szNames[0], pmib->songname, 32); norders = pmib->norders; if (norders > MAX_ORDERS) norders = MAX_ORDERS; m_nRestartPos = pmib->repeatpos; m_nDefaultGlobalVolume = pmib->globalvol; m_nDefaultTempo = pmib->tempo; m_nDefaultSpeed = pmib->speed; m_nChannels = 4; for (i=0; i<32; i++) { ChnSettings[i].nVolume = 64; ChnSettings[i].nPan = (pmib->channelinfo[i] & 0x7F) << 1; if (pmib->channelinfo[i] & 0x80) ChnSettings[i].dwFlags |= CHN_MUTE; else m_nChannels = i+1; } for (j=0; j<norders; j++) Order[j] = pmib->seq[j]; break; // ME: song message case 0x454D: if (blocklen) { - if (m_lpszSongComments) delete m_lpszSongComments; + if (m_lpszSongComments) delete [] m_lpszSongComments; m_lpszSongComments = new char[blocklen]; if (m_lpszSongComments) { memcpy(m_lpszSongComments, lpStream+dwMemPos, blocklen); m_lpszSongComments[blocklen-1] = 0; } } break; // PA: Pattern Data case 0x4150: npatterns = lpStream[dwMemPos]; if (npatterns > MAX_PATTERNS) npatterns = MAX_PATTERNS; dwPos = dwMemPos + 1; for (i=0; i<npatterns; i++) { if (dwPos+18 >= dwMemLength) break; pmpd = (MDLPATTERNDATA *)(lpStream + dwPos); if (pmpd->channels > 32) break; PatternSize[i] = pmpd->lastrow+1; if (m_nChannels < pmpd->channels) m_nChannels = pmpd->channels; dwPos += 18 + 2*pmpd->channels; for (j=0; j<pmpd->channels; j++) { patterntracks[i*32+j] = pmpd->data[j]; } } break; // TR: Track Data case 0x5254: if (dwTrackPos) break; ntracks = *((WORD *)(lpStream+dwMemPos)); dwTrackPos = dwMemPos+2; |