aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood/sound.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2013-12-28 14:21:48 +0100
committerTorbjörn Andersson2013-12-28 14:21:48 +0100
commitba3172b55f0b2bc2ebae1cb90804714e44d60c6f (patch)
treee1c1a8653bbe743be10e0d24bcb65542fb9f38bf /engines/neverhood/sound.cpp
parent185c232b60ec25ed5ab7f8cb8bb9e59ac987e4c0 (diff)
downloadscummvm-rg350-ba3172b55f0b2bc2ebae1cb90804714e44d60c6f.tar.gz
scummvm-rg350-ba3172b55f0b2bc2ebae1cb90804714e44d60c6f.tar.bz2
scummvm-rg350-ba3172b55f0b2bc2ebae1cb90804714e44d60c6f.zip
NEVERHOOD: Fix crash when playing uncompressed sounds
This happened to me when (or shortly afterwards; I'm not quite sure) lighting the fuse on the TNT dummy.
Diffstat (limited to 'engines/neverhood/sound.cpp')
-rw-r--r--engines/neverhood/sound.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp
index 4946de1681..6888cc56bc 100644
--- a/engines/neverhood/sound.cpp
+++ b/engines/neverhood/sound.cpp
@@ -560,7 +560,7 @@ int NeverhoodAudioStream::readBuffer(int16 *buffer, const int numSamples) {
}
} else {
memcpy(buffer, _buffer, bytesRead);
- buffer += bytesRead;
+ buffer += samplesRead;
}
if (bytesRead < bytesToRead || _stream->pos() >= _stream->size() || _stream->err() || _stream->eos()) {