mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-04 07:41:58 +00:00
SWORD1: Fix mismatching malloc/delete[]
This commit is contained in:
parent
1cf604363c
commit
4a6c0fb35e
@ -130,11 +130,11 @@ void Sound::checkSpeechFileEndianness() {
|
|||||||
int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size, &leOk);
|
int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size, &leOk);
|
||||||
uint32 maxSamples = size > 2000 ? 2000 : size;
|
uint32 maxSamples = size > 2000 ? 2000 : size;
|
||||||
double le_diff = endiannessHeuristicValue(data, size, maxSamples);
|
double le_diff = endiannessHeuristicValue(data, size, maxSamples);
|
||||||
delete[] data;
|
free(data);
|
||||||
_bigEndianSpeech = true;
|
_bigEndianSpeech = true;
|
||||||
data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size, &beOk);
|
data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size, &beOk);
|
||||||
double be_diff = endiannessHeuristicValue(data, size, maxSamples);
|
double be_diff = endiannessHeuristicValue(data, size, maxSamples);
|
||||||
delete [] data;
|
free(data);
|
||||||
// Set the big endian flag
|
// Set the big endian flag
|
||||||
if (leOk && !beOk)
|
if (leOk && !beOk)
|
||||||
_bigEndianSpeech = false;
|
_bigEndianSpeech = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user