aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/sound
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-18 22:40:48 -0400
committerPaul Gilbert2017-07-18 22:40:48 -0400
commit60de2718bddeb1c14b3ec031d3a9fcc931bd38a3 (patch)
tree801ec1db27dc37a7487a037dcddd840bc34b02c7 /engines/titanic/sound
parentcbd807221ec6079a40ce2c0e0d8d82ae569ff4d0 (diff)
downloadscummvm-rg350-60de2718bddeb1c14b3ec031d3a9fcc931bd38a3.tar.gz
scummvm-rg350-60de2718bddeb1c14b3ec031d3a9fcc931bd38a3.tar.bz2
scummvm-rg350-60de2718bddeb1c14b3ec031d3a9fcc931bd38a3.zip
TITANIC: Fix new[] vs free mismatches
Diffstat (limited to 'engines/titanic/sound')
-rw-r--r--engines/titanic/sound/wave_file.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp
index c9205c76ac..e6232204e7 100644
--- a/engines/titanic/sound/wave_file.cpp
+++ b/engines/titanic/sound/wave_file.cpp
@@ -93,7 +93,7 @@ CWaveFile::~CWaveFile() {
if (_disposeAudioBuffer == DisposeAfterUse::YES && _audioBuffer)
delete _audioBuffer;
- delete[] _waveData;
+ free(_waveData);
}
uint CWaveFile::getDurationTicks() const {
@@ -117,7 +117,7 @@ bool CWaveFile::loadSound(const CString &name) {
Common::SeekableReadStream *stream = file.readStream();
uint wavSize = stream->size();
- byte *data = new byte[wavSize];
+ byte *data = (byte *)malloc(wavSize);
stream->read(data, wavSize);
load(data, wavSize);