From 60de2718bddeb1c14b3ec031d3a9fcc931bd38a3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 18 Jul 2017 22:40:48 -0400 Subject: TITANIC: Fix new[] vs free mismatches --- engines/titanic/sound/wave_file.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/titanic/sound') 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); -- cgit v1.2.3