author | erik <erik> | 2007-01-31 22:21:38 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-31 22:21:38 (UTC) |
commit | ed5fba8cdb27174427b2e7780508bafa05536ca1 (patch) (unidiff) | |
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 | |||
@@ -232,33 +232,33 @@ BOOL CSoundFile::ReadMDL(const BYTE *lpStream, DWORD dwMemLength) | |||
232 | m_nChannels = 4; | 232 | m_nChannels = 4; |
233 | for (i=0; i<32; i++) | 233 | for (i=0; i<32; i++) |
234 | { | 234 | { |
235 | ChnSettings[i].nVolume = 64; | 235 | ChnSettings[i].nVolume = 64; |
236 | ChnSettings[i].nPan = (pmib->channelinfo[i] & 0x7F) << 1; | 236 | ChnSettings[i].nPan = (pmib->channelinfo[i] & 0x7F) << 1; |
237 | if (pmib->channelinfo[i] & 0x80) | 237 | if (pmib->channelinfo[i] & 0x80) |
238 | ChnSettings[i].dwFlags |= CHN_MUTE; | 238 | ChnSettings[i].dwFlags |= CHN_MUTE; |
239 | else | 239 | else |
240 | m_nChannels = i+1; | 240 | m_nChannels = i+1; |
241 | } | 241 | } |
242 | for (j=0; j<norders; j++) Order[j] = pmib->seq[j]; | 242 | for (j=0; j<norders; j++) Order[j] = pmib->seq[j]; |
243 | break; | 243 | break; |
244 | // ME: song message | 244 | // ME: song message |
245 | case 0x454D: | 245 | case 0x454D: |
246 | if (blocklen) | 246 | if (blocklen) |
247 | { | 247 | { |
248 | if (m_lpszSongComments) delete m_lpszSongComments; | 248 | if (m_lpszSongComments) delete [] m_lpszSongComments; |
249 | m_lpszSongComments = new char[blocklen]; | 249 | m_lpszSongComments = new char[blocklen]; |
250 | if (m_lpszSongComments) | 250 | if (m_lpszSongComments) |
251 | { | 251 | { |
252 | memcpy(m_lpszSongComments, lpStream+dwMemPos, blocklen); | 252 | memcpy(m_lpszSongComments, lpStream+dwMemPos, blocklen); |
253 | m_lpszSongComments[blocklen-1] = 0; | 253 | m_lpszSongComments[blocklen-1] = 0; |
254 | } | 254 | } |
255 | } | 255 | } |
256 | break; | 256 | break; |
257 | // PA: Pattern Data | 257 | // PA: Pattern Data |
258 | case 0x4150: | 258 | case 0x4150: |
259 | npatterns = lpStream[dwMemPos]; | 259 | npatterns = lpStream[dwMemPos]; |
260 | if (npatterns > MAX_PATTERNS) npatterns = MAX_PATTERNS; | 260 | if (npatterns > MAX_PATTERNS) npatterns = MAX_PATTERNS; |
261 | dwPos = dwMemPos + 1; | 261 | dwPos = dwMemPos + 1; |
262 | for (i=0; i<npatterns; i++) | 262 | for (i=0; i<npatterns; i++) |
263 | { | 263 | { |
264 | if (dwPos+18 >= dwMemLength) break; | 264 | if (dwPos+18 >= dwMemLength) break; |