mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 15:21:40 +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);
|
||||
uint32 maxSamples = size > 2000 ? 2000 : size;
|
||||
double le_diff = endiannessHeuristicValue(data, size, maxSamples);
|
||||
delete[] data;
|
||||
free(data);
|
||||
_bigEndianSpeech = true;
|
||||
data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size, &beOk);
|
||||
double be_diff = endiannessHeuristicValue(data, size, maxSamples);
|
||||
delete [] data;
|
||||
free(data);
|
||||
// Set the big endian flag
|
||||
if (leOk && !beOk)
|
||||
_bigEndianSpeech = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user