diff options
-rw-r--r-- | scumm/sound.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 5ba1446ff9..2b24f1694d 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -235,7 +235,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) { return; } - // This pointer needs to be freed + // This pointer will be freed at the end of the function mallocedPtr = ptr; } else { debugC(DEBUG_SOUND, "playSound #%d (room %d)", soundID, @@ -509,7 +509,7 @@ void Sound::playSound(int soundID, int heOffset, int heChannel, int heFlags) { rate = 3579545 / READ_BE_UINT16(ptr + 20); sound = (char *)malloc(size); int vol = ptr[24] * 4; - memcpy(sound,ptr + READ_BE_UINT16(ptr + 8), size); + memcpy(sound, ptr + READ_BE_UINT16(ptr + 8), size); _vm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE, soundID, vol, 0); } else { |