Fix crash in ADPCM decoder.

svn-id: r19167
This commit is contained in:
Eugene Sandulenko 2005-10-19 05:16:50 +00:00
parent 4306c9344c
commit 12a66937cc

View File

@ -318,7 +318,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) {
if (type == 17) {
AudioStream *voxStream = new ADPCMInputStream(&stream, size, kADPCMIma, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1);
sound = (char *)malloc(size * 2);
sound = (char *)malloc(size * 4);
size = voxStream->readBuffer((int16*)sound, size * 2);
} else {
// Allocate a sound buffer, copy the data into it, and play