aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorJohannes Schickel2010-03-04 17:46:18 +0000
committerJohannes Schickel2010-03-04 17:46:18 +0000
commitef70f6996b0243e00d153c9c4ede2aad5b1f7779 (patch)
treefa96bd2236885b9b3aab42ff274b23c585a466da /engines/scumm
parentca6b617e630d4f232afb8cb1353e757ebdab500e (diff)
downloadscummvm-rg350-ef70f6996b0243e00d153c9c4ede2aad5b1f7779.tar.gz
scummvm-rg350-ef70f6996b0243e00d153c9c4ede2aad5b1f7779.tar.bz2
scummvm-rg350-ef70f6996b0243e00d153c9c4ede2aad5b1f7779.zip
Fix another mismatching new[] call (note that this needs to be replaced by malloc, since else MemoryReadStream will try to use free on an new[] allocated block.)
svn-id: r48162
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
index be5f7623ca..3ae6f7e919 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -281,7 +281,7 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size,
lastBlock = _numCompItems - 1;
int32 blocksFinalSize = 0x2000 * (1 + lastBlock - firstBlock);
- *compFinal = new byte[blocksFinalSize];
+ *compFinal = (byte *)malloc(blocksFinalSize);
assert(*compFinal);
finalSize = 0;
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 8b11c0aadd..24cac8707b 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -464,7 +464,7 @@ ImuseDigiSndMgr::SoundDesc *ImuseDigiSndMgr::openSound(int32 soundId, const char
sound->disk = _disk;
prepareSound(ptr, sound);
if ((soundType == IMUSE_BUNDLE) && !sound->compressed) {
- delete[] ptr;
+ free(ptr);
}
return sound;
}